"Write access is required for uploading LFS objects" when pushing to repo Edited

An error have begun popping on different machines in our office and we are not exactly sure what is causing it. We haven't done any modifications or changes to our setup that would cause such an error. It is only a handful of our git users that are experiencing this.

We figured out we could resolve the issue by switching from HTTPS to SSH, but we would much prefer to stay using HTTPS.

Here is a trace output of the error.

 

$ GIT_TRACE=1 git push

12:26:00.778498 git.c:328 trace: built-in: git 'push'

12:26:00.780504 run-command.c:626 trace: run_command: 'remote-https' 'origin' 'https://USER@bitbucket.org/COMPANY/REPO.git'

12:26:00.801539 git.c:560 trace: exec: 'git-remote-https' 'origin' 'https://USER@bitbucket.org/COMPANY/REPO.git'

12:26:00.802040 run-command.c:626 trace: run_command: 'git-remote-https' 'origin' 'https://USER@bitbucket.org/COMPANY/REPO.git'

12:26:01.783649 run-command.c:626 trace: run_command: 'git credential-manager get'

12:26:01.844961 git.c:560 trace: exec: 'git-credential-manager' 'get'

12:26:01.845463 run-command.c:626 trace: run_command: 'git-credential-manager' 'get'

12:26:04.002673 run-command.c:626 trace: run_command: 'git credential-manager store'

12:26:04.062128 git.c:560 trace: exec: 'git-credential-manager' ‘store'

12:26:04.062631 run-command.c:626 trace: run_command: 'git-credential-manager' 'store'

12:26:04.346886 run-command.c:626 trace: run_command: '.git/hooks/pre-push' 'origin' 'https://USER@bitbucket.org/COMPANY/REPO.git'

12:26:04.410756 git.c:560 trace: exec: 'git-lfs' 'pre-push' 'origin' 'https://USER@bitbucket.org/COMPANY/REPO.git'

12:26:04.411257 run-command.c:626       trace: run_command: 'git-lfs' 'pre-push' 'origin' 'https://USER@bitbucket.org/COMPANY/REPO.git'

trace git-lfs: run_command: 'git' config -l

trace git-lfs: run_command: 'git' version

trace git-lfs: tq: running as batched queue, batch size of 100

trace git-lfs: pre-push: refs/heads/master 0b4dbace014695ef730e38a118192d6e128dfdf5 refs/heads/master 8c98bf5fd8e7548866421810e7b0f00edcaf3924

trace git-lfs: run_command: git rev-list --objects 0b4dbace014695ef730e38a118192d6e128dfdf5 --not --remotes=origin --

trace git-lfs: run_command: git cat-file --batch-check

trace git-lfs: run_command: git cat-file --batch

trace git-lfs: tq: sending batch of size 1

trace git-lfs: api: batch 1 files

trace git-lfs: creds: git credential fill ("https", "bitbucket.org", "COMPANY/REPO.git")

trace git-lfs: Filled credentials for https://USER@bitbucket.org/COMPANY/REPO.git

trace git-lfs: Error reading cert file "/ssl/certs/ca-bundle.crt": open /ssl/certs/ca-bundle.crt: The system cannot find the path specified.

trace git-lfs: HTTP: POST https://USER@bitbucket.org/COMPANY/REPO.git/info/lfs/objects/batch

trace git-lfs: HTTP: 403

trace git-lfs: HTTP: {"message": "Write access is required for uploading LFS objects"}

trace git-lfs: api error: Write access is required for uploading LFS objects

Git LFS: (0 of 1 files) 0 B / 131.03 KB

batch response: Write access is required for uploading LFS objects

error: failed to push some refs to 'https://USER@bitbucket.org/COMPANY/REPO.git'

 

1 answer

1 accepted

I believe I found a solution to the problem. I forgot to mention that we were using Sourcetree. In the above mention log the following error was produced:

trace git-lfs: Error reading cert file "/ssl/certs/ca-bundle.crt": open /ssl/certs/ca-bundle.crt: The system cannot find the path specified.

It appears that there are some issues reading the certificate to establish a SSL connection.

I figured out that you could reset / re-add the certificate by clearing your current credentials and re-enter them. Because we were using Sourcetree we removed all credentials for the user in Sourcetree and got the user to log in again. After doing so, we could once again push to out LFS server.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,768 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you