Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,529
Community Members
 
Community Events
176
Community Groups

Git LFS push results in "batch request: Unauthorized: exit status 1"

Greetings,

I've forked one of my repositories and I now want fork it's LFS as well.

Following this guide:

https://support.atlassian.com/bitbucket-cloud/docs/current-limitations-for-git-lfs-with-bitbucket/#CurrentlimitationsforGitLFSwithBitbucket-fork

I've got to the point of

git lfs push --all origin

 And I got 

batch request: Unauthorized: exit status 1

I've tried adding an SSH key, I've made sure that I have read, write and even admin permissions. all to no avail.
Steps to reproduce:

Create a repo, install LFS, track a file using LFS, Fork the repo and follow above guide.

1 answer

0 votes
Patrik S Atlassian Team Dec 15, 2022

Hello @Kostya Sydoruk ,

Welcome to Atlassian Community!

I tried to reproduce the error you reported and the LFS push was completed successfully, so let me share the steps I've followed with you : 

1. Clone the main repository in my local 

2. Fetch all LFS history

git lfs fetch --all origin

At this point, your local clone should have all the LFS files downloaded

3. Inside the local clone, add a remote that points to the forked repository : 

If using SSH :

git remote add fork-origin git@bitbucket.org:<fork's workspace>/<fork repository>.git

Make sure the SSH key being used is associated with a user that has write access to the forked repository.

If using HTTPS

git remote add fork-origin https://BITBUCKET_USERNAME@bitbucket.org/<fork's workspace>/<fork repo>.git

When using HTTPS, if asked for a password, make sure to provide an App Password with the required permissions. If you are still getting an Unauthorized error, you can create an App Password with all permissions checked and try again.

4. Push the LFS files to the forked repo using the origin you set in Step 3 : 

git lfs push --all fork-origin

You can try following the steps above and let us know how it goes.

Thank you, @Kostya Sydoruk .

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events