Something has broken with Git LFS, leaving me stuck and unable to push anything


I’m having trouble pushing new commits that include any file changes tracked in Git LFS. Earlier today, I committed a .psd file — PSDs are being tracked in .gitattributes as LFS files. I just went to try and push to GitHub, but can’t get past this error:

Jack@Jacks-iMac:~/Sites/MyProject$ git push GitHub landing-pages
batch response: Authorization error:                                                                                                                                                                  
Check that you have proper access to the repository
Uploading LFS objects:   0% (0/1), 0 B | 0 B/s, done.
error: failed to push some refs to ''

I definitely do have proper access to the repository — I’ve been pushing to it for years without issue. Running git lfs status outputs this:

Jack@Jacks-iMac:~/Sites/MyProject$ git lfs status
On branch landing-pages
Git LFS objects to be pushed to GitHub/landing-pages:
public/images/landing/screenshots/Screenshot.psd (3ad90fa780871ca89a53f5056348c5da5f5f079adb3bf8cd028bdf147e301af0)
Git LFS objects to be committed:

Git LFS objects not staged for commit:

As per GitHub’s support article, I tried the following too, without any luck:

Jack@Jacks-iMac:~/Sites/MyProject$ git lfs push --all GitHub landing-pages
Uploading LFS objects:   0% (0/7), 0 B | 0 B/s, done.                                                                                                                                                                                                        
batch response: Authorization error:
Check that you have proper access to the repository

I have also tried reinstalling with git lfs uninstall followed by git lfs install — same outcome.

Here is the output from git lfs env:

Jack@Jacks-iMac:~/Sites/MyProject$ git lfs env
git-lfs/2.9.2 (GitHub; darwin amd64; go 1.13.5)
git version 2.21.1 (Apple Git-122.3)
Endpoint (GitHub)= (auth=none)
git config filter.lfs.process = "git-lfs filter-process"
git config filter.lfs.smudge = "git-lfs smudge -- %f"
git config filter.lfs.clean = "git-lfs clean -- %f"

I don’t mind if I lose the .psd file, I’m not precious about it being committed. But at the moment I’m stuck and unable to push anything at all. Any help would be much appreciated!



@jackwh - Hey there, and thanks for creating this topic!

“Check that you have proper access to the repository”  is an indication of an authorization error. Given the URLs posted in those logs, I see that the repository is JackWH/MyProject.

However, when I navigate to, returns a 404.

This could mean one of three things:

  • the repository doesn’t exist,
  • the repository is a private repository that only authorized collaborators have access to, or
  • it’s a name that serves as a placeholder for a different repository.

Moving forward, here are some questions that I’d love your confirmation on:

  • Assuming that the repository you’re pushing to exists, could we confirm with you that the name of the repository on matches what’s written on the command line? 
  • Because the error is related to authorization, would it be possible for you to double check the credentials you’re using to push to using Git? For example, it may be worth trying a personal access token instead of your account’s password to authenticate.

Here’s an example from one of our blog posts around using Git over HTTPS and OAuth :

git clone https://<token>

If you clone that repository, the token will already be embedded in the Git remote configuration. Alternatively, you could update your Git remotes by embedding the personal access token in the URL as a way of updating your authentication.

Let us know how you get on!

@jackwh - did you ever find a resolution to this issue? I have had a similar issue suddenly crop up on a handful of machines at work when fetching git-lfs data from Bitbucket.