We ran into an issue where a Gitlab Project Access Token simply would not work when trying to clone a repository it definitely had permission to, it would report this error:

You are not allowed to download code from this project.

It turns out that Project Access Tokens in a private repository will not work if you select “Guest” when creating the token. Using “Reporter” or any other solves the issue.

You may look at this Stack Overflow post if the above solution doesn’t help your problem as it details a number of other causes for this: https://stackoverflow.com/questions/25409700/using-gitlab-token-to-clone-without-authentication

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.