Answers: <p>In my case this was because the token I was creating, though it had the <code>read_repository</code> and <code>write_repository</code> permissions, it was not set to the role of &quot;Developer&quot; or higher.</p>
  <p><strong>Recreating the token with the role of Developer instead of Guest solved the problem for me.</strong></p>
  
Answers: CC BY-SA 4.0
Answers: 2024-03-20T01:54:52.083Z
Answers: 2024-03-20T01:54:52.083Z
Answers: Evan Carroll
Body: <p>When I try to use a project access token, I'm getting</p>
  <pre><code>$ git clone https://asdf:token@acme.com/evancarroll/foo.git
  Cloning into 'foo'...
  remote: You are not allowed to download code from this project.
  fatal: unable to access 'https://acme.com/evancarroll/foo.git/': The requested URL returned error: 403
  </code></pre>
  
Tags: <gitlab><gitlab-ci>
Title: When using a Project Access Token, I'm getting "The requested URL returned error: 403"
UserDisplayName: Evan Carroll
ThreadText: # When using a Project Access Token, I'm getting "The requested URL returned error: 403"
  
  (Asked by: username_0 on 2024-03-20)
  
  When I try to use a project access token, I'm getting
  
  ```
  $ git clone https://asdf:token@acme.com/username_0/foo.git
  Cloning into 'foo'...
  remote: You are not allowed to download code from this project.
  fatal: unable to access 'https://acme.com/username_0/foo.git/': The requested URL returned error: 403
  
  ```
  
  **Tags:** gitlab, gitlab-ci
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2024-03-20. Score: 1 | Accepted answer
  
  In my case this was because the token I was creating, though it had the `read_repository` and `write_repository` permissions, it was not set to the role of "Developer" or higher.
  
  **Recreating the token with the role of Developer instead of Guest solved the problem for me.**
  
  
  ---
  
  