-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with git-lfs-migrate and BitBucket 4.11 with LFS support #29
Comments
As a workaround, you can run the "lfs-test-server" locally for the conversion; then use |
Thanks @leth, I didn't realize the source repository had to be bare, so I did: Then I managed to get git-lfs-migrate to run properly with lfs-test-server using the default options. This starts the LFS server on http://localhost:8080. This is the command I invoked: Everything seemed to work fine. Then to test out the new LFS-based repo I did: When that command tries to checkout the HEAD of master, it fails with this output:
That log file referenced shows this:
It seems lfs-test-server isn't compatible with local directory-based repositories. Is this benign? I assumed it was and tried to do this: This errors with:
Any other approaches anyone can think of? |
Git LFS urls are always HTTP; by default it will autodiscover the correct url. I'm only suggesting using the url override for the one-off transform, then pushing them across to their ideal server. Here's roughly how I'm doing my migration, I'm doing all this on linux, so YMMV:
Hope that helps! |
If you don't set |
finally got it working using this to convert and push a local repository! more or less what i did was:
|
Should this issue be closed? Or is there still some work that needs to happen? |
Not sure... If it IS all working, I think the instructions/tutorial on how to use git-lfs-migrate should be updated. I'm getting the same issue, and am having to read through this conversation to try to work out how to actually do the conversion. Would be cool if the instructions were a bit more detailed, to help getting the migration working :) |
I tried to follow the steps given by flipside as what was working:
This seems to run OK. As far as I can tell it's put the binaries into folder called "lfs" inside "lfs-converted-repo.git". Then I try:
This last command fails, because repo-converted.git is a bare repository, and you have to run
But this now fails with errors trying to download the tracked files:
Apparently (git-lfs/git-lfs#1207) this is because Git LFS only works when downloading from a server (not from file)... so I guess I'd need to be able to do the push, but I can't do the add of the remote... catch 22? :P I'm not running the lfs test server, but it didn't seem from that latest post that that was necessary? |
I now see that the error I was getting was due to the remote command being wrong. It should be:
Otherwise it was trying to I then did
So, I've gotten a bit further, but not quite there yet :) Maybe this is the problem:
Not sure where the "origin/origin/.." branches came from, but might be the issue... |
I think I've worked out a solution to the new problem. When I do the conversion I end up with branches
After this the rest of flipside's solution works for me (with the "add" and "remote" swapped). |
Hello,
I'm trying to use git-lfs-migrate to migrate an internal Subversion repository to Git for use with Atlassian BitBucket 4.11. This repository has a lot of binary files and I'd like to remove them from the git history using git-lfs-migrate. I'm using Windows 7, Java 1.8.0_91, Git LFS 1.5.5, git 2.10.0.windows.1.
In the commands and output below, I've changed the repository name to repo.git, the BitBucket project to 'project', the BitBucket server name to somebitbucketserver.net and the BitBucket IP address to 111.111.111.111 for illustration purposes.
When I issue any of the following commands:
java -jar git-lfs-migrate.jar -s repo.git -d repo.lfs.git --lfs https://somebitbucketserver.net/myproject/repo.git/info/lfs --no-check-certificate --glob-file binaries.txt
java -jar git-lfs-migrate.jar -s repo.git -d repo.lfs.git --lfs https://somebitbucketserver.net --no-check-certificate --glob-file binaries.txt
java -jar git-lfs-migrate.jar -s repo.git -d repo.lfs.git --lfs https://user:[email protected]/myproject/repo.git/info/lfs --no-check-certificate --glob-file binaries.txt
java -jar git-lfs-migrate.jar -s repo.git -d repo.lfs.git --lfs https://user:[email protected] --no-check-certificate --glob-file binaries.txt
I always get this error:
I suspect it has something to do with authentication because in order to view the repository via HTTPS in a browser, I have to authenticated using our third-party SSO service. However, repos are fully accessible via SSH. Which led me to try the following in a git bash session after I added my SSH key to ssh-agent:
java -jar git-lfs-migrate.jar -s repo.git -d repo.lfs.git -g ssh://[email protected]:7999/project/repo.git --glob-file binaries.txt --no-check-certificate
java -jar git-lfs-migrate.jar -s repo.git -d repo.lfs.git -g [email protected]:project/repo.git --glob-file binaries.txt --no-check-certificate
java -jar git-lfs-migrate.jar -s repo.git -d repo.lfs.git -g ssh://[email protected]:7999/project/repo.git --glob-file binaries.txt
java -jar git-lfs-migrate.jar -s repo.git -d repo.lfs.git -g [email protected]:project/repo.git --glob-file binaries.txt
These commands always gives this error:
I also tried:
java -jar git-lfs-migrate.jar -s repo.git -d repo.lfs.git --lfs ssh://[email protected]:7999/project/repo.git --glob-file binaries.txt --no-check-certificate
Which errors with:
Is there some way to get this working other than resorting to filter-branch or cluttering my repo with .gitattributes files from bfg --convert-to-git-lfs?
Thanks,
Mike
The text was updated successfully, but these errors were encountered: