Dear all,
I’m encountering problems in pushing my model.pkl on my space.
Here is the error message after I tried push.git
batchrequest: git@hf.co: Permission denied (publickey).: exit status 255
Uploading LFS objects: 0% (0/1), 0 B | 0 B/s, done.
error: failed to push some refs to 'hf.co:spaces/DaijobuAI/spaceName
I am using SSH authentification. If I try ssh -T git@hf.co, I’m authenticated without problem:
Hi DaijobuAI, welcome to Hugging Face.
All my previous pushes (without the model) worked.
I tried this solution : Git LFS fail for Spaces with Github Workflow - #7 by Clatonh
The model.pkl file is removed and pushing works again. If I copy the file again, it fails again.
On the first try of pushing my model, I got this error:
Remote “origin” does not support the Git LFS locking API. Consider disabling it with:
$ git config lfs.https://hf.co/spaces/DaijobuAI/spaceName.git/info/lfs.locksverify false
And I run the command.
Here are the other commands I tried:
$ git lfs track .\model.pkl
“model.pkl” already supported
$ git lfs install
Updated Git hooks.
Git LFS initialized.
I also tried to restart from scratch with a fresh space/depo.
The file is about 110M, I am using VSCode on Windows 11 and the commands are run in VSCode Terminal. I updated Git to its latest version (2.43.0).
Any clue to help me ?
Thanks !
Daij
Edited to sanitize
hi @DaijobuAI ,
Please double check if you haven’t committed the .pkl
file to your git repot without LFS, this is a very common error.
Hi Radames,
Thanks for your help !
The .pkl file is commited with LFS. Here is the git show
response
commit 9f86def6ed8c75e55f12b8fadd7c0261dc292f7d (HEAD → main)
Author: gotDaijobu 141064187+gotDaijobu@users.noreply.github.com
Date: Fri Jan 5 18:20:51 2024 +0100
model
diff --git a/model.pkl b/model.pkl
new file mode 100644
index 0000000…19010b0
— /dev/null
+++ b/model.pkl
@@ -0,0 +1,3 @@
+version http[s]://git-lfs.github.com/spec/v1
+oid sha256:2a62e5f45a23cb41bcfbad5d08f3affabb120842d5b66f9afc429a4ac691d91b
+size 114828705
Also, the response to git-lfs env
Endpoint=https://hf.co/spaces/DaijobuAI/spaceName.git/info/lfs (auth=basic)
SSH=git@hf.co:spaces/DaijobuAI/spaceName
LocalWorkingDir=C:\Sites\spaceName
LocalGitDir=C:\Sites\spaceName.git
LocalGitStorageDir=C:\Sites\spaceName.git
LocalMediaDir=C:\Sites\spaceName.git\lfs\objects
LocalReferenceDirs=
TempDir=C:\Sites\spaceName.git\lfs\tmp
ConcurrentTransfers=8
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=C:\Sites\spaceName.git\lfs
AccessDownload=basic
AccessUpload=basic
DownloadTransfers=basic,lfs-standalone-file,ssh
UploadTransfers=basic,lfs-standalone-file,ssh
GIT_LFS_PATH=C:\Program Files\Git LFS
GIT_ASKPASS=c:\Users\DaijobuAI\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\askpass.sh
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”
It really seem that the authentification problem is only with git-lfs, but I can’t figure why. My guess - from a lot of readings in the past 2 days - is that it has something to do with the terminal’s ssh-agent but I can’t find how to fix it.
Alternatively, I tried to used spaces over https instead of ssh but I couldn’t make it work. In my config file, the remote should be:
[remote “origin”]
url = https://<USERNAME>:<TOKEN>@huggingface.co/spaces/DaijobuAI/spaceName
Where Username is DaijobuAI and token an access token generated here : Hugging Face – The AI community building the future.. No quotes.
Is that right ? When I do, I get a “Repository not found” error TT
Thanks again for your help.
Daij