Greetings,
I've forked one of my repositories and I now want fork it's LFS as well.
Following this guide:
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.
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>.gitMake 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.