How do I use OAuth2 token to clone a repository, when that project is set to private?
I have an OAuth2 access token, which has the scopes read_api read_repository
. It works on the API calls, so it is not expired.
I have tried the following command on a private project I own:
git clone 'https://oauth2:9575eb4457............de69@gitlab.com/rok.lenarcic/rok-s-project.git'
And I get the response:
Cloning into 'rok-s-project'...
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://gitlab.com/rok.lenarcic/rok-s-project.git/'
How do I use my OAuth2 token to clone private repositories? Are the scopes I use correct?