I have a repository configured as a LFS git having a .gitattibute.
I have followed this tutorial
- I have created a remote repo using
gcloud source repos create myTestLFS - Have cloned using
gcloud source repos clone myTestLFS - Changed to myTestLFS dir and installed lfs:
git lfs install - Created a
.gitattributefile with the content*.kra filter=lfs diff=lfs merge=lfs -text - Added and commited and pushed the
.gitattibutefile to remote, it works but gives the message
Remote "origin" does not support the Git LFS locking API. Consider disabling it with:
$ git config lfs.https://source.developers.google.com/p/my-project-id/r/myTestLFS.git/info/lfs.locksverify false
- Created a file
acrow.kra - added and commited. But when I try to push, it gives this error message:
Uploading LFS objects: 0% (0/101), 0 B | 0 B/s, done.
batch response: Client error &{%!!(string=https) %!!(string=) %!!(*url.Userinfo=<nil>) %!!(string=source.cloud.google.com) %!!(string=/onboarding/welcome) %!!(stri
ng=) %!!(bool=false) %!!(bool=false) %!!(string=) %!!(string=) %!!(string=)}s(MISSING) from HTTP 405
error: failed to push some refs to 'https://source.developers.google.com/p/my-project-id/r/myTestLFS'
I'm on windows
I tried the same steps you mentioned in my cloud shell instance. It seems that maybe you have missed to install the lfs properly or you missed to run the command
git config lfs.https://source.developers.google.com/p/project_ID/r/myTestLFS.git/info/lfs.locksverify falsewhich is suggested in the error message you have shared. For your reference I have shared detailed steps which I have followed. I hope this helps in solving your issue.created a remote repo using
gcloud source repos create myTestLFSCloned the repo using the command
gcloud source repos clone myTestLFSSwitched to directory to
myTestLFSand executedgit lfs install, but got some error. Then I ran the commandsudo apt-get install git-lfsto install lfs and successfully executedgit lfs installafter that without any error.Created the
.gitattribute filewith the content\*.kra filter=lfs diff=lfs merge=lfs -textCommitted
.gitattribute filesuccessfully. But when I try to push I have also got the similar error as yours:To overcome above executed the command
git config lfs.https://source.developers.google.com/p/project_ID/r/myTestLFS.git/info/lfs.locksverify falseAt last I created a new file (acrow.kra) with some random plain text , It got pushed successfully without any errors.