Reputation: 41
I have created a fine grained access token and set up three access permissions for a read-only clone (Actions -> Access: Read-only, Contents -> Access: Read-only, Metadata -> Access: Read-only).
And, I have allowed Repository access for "All repositories".
After setting this token up, everything worked. And it still is, I can git clone repositories.
The problem starts, when I create a NEW REPOSITORY (after the fine grained token was set up). So, I created my repo_today, and as the read-only token was set up, I should be able to git clone this repo_today, however, I get:
Cloning into 'repo_today'...
Username for 'https://github.com': my_user
Password for 'https://[email protected]':
**remote: Write access to repository not granted.**
fatal: unable to access 'https://github.com/my_user/repo_today.git/': The requested URL returned error: 403
What is funny, however, since, if I create a new access token with the exact same access permissions (mentioned above), and set it for all repositories, I will be able to do git clone repo_today !!!
Is this how github tokens should function?!? I find it very awkward?!
Upvotes: 0
Views: 54
Reputation: 21
Go to Settings > Developer settings > Personal access tokens > Fine-grained tokens.
git clone https://github.com/my_user/your_repo.git
Upvotes: -1