Issue uploading model: "fatal: cannot exec '.git/hooks/pre-push': Permission denied"
Hi there,I’m trying to upload my first model to the model hub. I’ve followed step-by-step thedocs here, but encountered different issues:I got it to sort of work on my local machine, but it was extremely slow (20~kbit per sec) and I had to abandon it. I sawthis topicand thatgit lfs installis important, but it still doesn’t work.Now I’ve retried it on a google colab and there I’m getting the following error when I!git push:fatal: cannot exec '.git/hooks/pre-push': Permission denied.Here is a colab with my exact code:https://colab.research.google.com/drive/1OSJh4GySF_m3RZTPerXtBlNltMjv3hQy?usp=sharingUploading via colab is more important/convenient for me because I’m also training via colab.Would be great if someone could tell me what I’m doing wrong in the colab (I’m new to using git) and I’m looking forward to adding my first models to the hub
2020-12-26T10:09:12Z
Hi@MoritzLaurer, the doc could be improved but in your notebook it looks like you have two git repos (one you create with git init, the other you clone fromhuggingface.co) whereas you only should have one.Here’s a minimal Colab here:https://colab.research.google.com/drive/1TFgta6bYHte2lLiQoJ0U0myRd67bIuiu?usp=sharingLet me know if this solves your issue.@sguggerI think we might want to remove the “and your clone is setup with the right remote URL” clause from the doc as it seems to be more confusing than helpful, what do you think? Maybe we can also link to my Colab above as a self-contained example of how to push from a Colab notebook.
2020-12-26T10:10:49Z
(Also cc’ing@pierricfor info)
2020-12-27T00:24:01Z
Thanks so much@julien-c, I followed the code in your colab and it works! Very happy about my first model (now living here) and I’ll add a model card with a proper description, metrics etc soonJust FYI:  I think that the errorfatal: cannot exec '.git/hooks/pre-push': Permission deniedcomes up when I put the model in a folder in my google drive, other than the default “/content” folder. When I don’t change the directory and just upload my model in the default “/content” folder (as you did), I don’t get the error. But when I try to upload it from another folder within colab, the error comes up. Here is acolab with your code slightly altered that produces the errorand this is probably the problematic line of code:from google.colab import drive
drive.mount('/content/drive')
%cd /content/drive/My\ Drive/Colab\ Notebooks/results/The issue is a bit inconvenient, but I know that’s not an issue withTransformers(might be useful to know for other people who try to change directory).
2021-01-04T22:23:53Z
Happy to do the change to the doc! Could you push your notebook in the notebooks repo so we can link it (through colab) from there? Afraid the random link might disappear some day.
2021-09-23T19:35:12Z
I also have this error but I don’t think I have 2 repos.I also get an error during the commit:fatal: cannot exec '.git/hooks/post-commit': Permission deniedWhat’s wrong with my notebook?drive.google.commodel_train_upload_workflow.ipynbColaboratory notebook