title: Gitlab LFS: Access forbidden. Check your access level
body: <p>A new project was created on the production environment. I forgot to enable LFS and when pushing to it, it didn’t work. </p>
  
  <p>But now, when I do <code>git lfs push</code> for any project when adding some LFS file (it can be small so it isn’t some timeout issue) it keeps pushing, and every time it says: <code>LFS: Access forbidden. Check your access level.</code> </p>
  
  <p>I try again and every time it tries, it makes a new folder in cache folder of lfs-objects. </p>
  
  <p>I know that project has LFS enabled, because if I disable it it fails at:</p>
  
  <ul>
  <li><code>trace git-lfs: HTTP: POST …/info/lfs/locks/verify</code></li>
  <li><code>trace git-lfs: HTTP: POST …/info/lfs/objects/batch</code></li>
  </ul>
  
  <p>And when LFS is enabled it goes pass this but fails here:</p>
  
  <blockquote>
    <p>22:48:00.649880 trace git-lfs: HTTP:
    {“objects”:[{“oid”:“7571a85db75aa74d7902aec1fd52d57d2f61bd48d477d319f05e7cbba46155ce”,“size”:2088566784,“actions”:{“upload”:{“href”:"…/gitlab-lfs/objects/7571a85db75aa74d7902aec1fd52d57d2f61bd48d477d319f05e7cbba46155ce/2088566784",“header”:{“Authorization”:“Basic
    ZGVuaXNvOiE0S3JhdG5vU3Jhbmpldkl0YWxpamkh”}}}}]} 22:48:00.649880 trace
    git-lfs: tq: starting transfer adapter “basic” Git LFS: (0 of 1 files)
    0 B / 1.95 GB 22:48:00.650380 trace git-lfs: HTTP: PUT
    …/gitlab-lfs/objects/7571a85db75aa74d7902aec1fd52d57d2f61bd48d477d319f05e7cbba46155ce/2088566784
    Git LFS: (0 of 1 files) 1.95 GB / 1.95 GB 22:50:48.049854 trace
    git-lfs: HTTP: 403 22:50:48.049854 trace git-lfs: HTTP:
    {“message”:“Access forbidden. Check your access
    level.”,“documentation_url”:“<a href="https://git.comtrade.com/help" rel="noreferrer">https://git.comtrade.com/help</a>”}
    22:50:48.050354 trace git-lfs: tq: retrying object
    7571a85db75aa74d7902aec1fd52d57d2f61bd48d477d319f05e7cbba46155ce: LFS:
    Access forbidden. Check your access level. 22:50:48.050354 trace
    git-lfs: tq: enqueue retry #1 for
    “7571a85db75aa74d7902aec1fd52d57d2f61bd48d477d319f05e7cbba46155ce”
    (size: 2088566784)</p>
  </blockquote>
  
  <p>Any idea what could be the problem?</p>
  
  <p>This still works on test environment. I’m looking for differences but can’t find them.</p>