push_to_hub related issues (from Google Colab)
I am trying to write a transformer model to a repo at huggingface.co
!git push doesn't work after successful !git add . and !git commit 
fatal: could not read username for https://huggingface.co no such device or address
Are you inside a Colab?

You might want to try `huggingface_hub.Repository` and pass in an authentication token
<|||||>To write to the repo, you'll also need to login with `!huggingface-cli login`

Once you've done that, if you want to use only git commands without passing by the `Repository` class, you can do it as such:

```
!git clone https://user:$(cat /root/.huggingface/token)@huggingface.co/<NAMESPACE>/<MODEL_ID>
```

or, if you'd rather use environment variables:

```py
# Put the token in an environment variable
from huggingface_hub import HfFolder
import os
os.environ['HF_AUTH'] = HfFolder().get_token()
```
```
# Clone the repo with authentication
!git clone https://user:$HF_AUTH@huggingface.co/<NAMESPACE>/<MODEL_ID>
```<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.