# Unable to Read Username for 'https://huggingface.co'

**URL:** <https://discuss.huggingface.co/t/unable-to-read-username-for-https-huggingface-co/55450>\
**Category:** Models\
**Created:** [September 18, 2023, 12:31pm UTC](https://discuss.huggingface.co/t/unable-to-read-username-for-https-huggingface-co/55450 "2023-09-18T12:31:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michaelomd007](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@Michaelomd007](https://discuss.huggingface.co/u/Michaelomd007)\
**Post date:** [September 18, 2023, 12:31pm UTC](https://discuss.huggingface.co/t/unable-to-read-username-for-https-huggingface-co/55450/1 "2023-09-18T12:31:50Z")

</div>

I am trying to git clone meta-llama/Llama-2-7b-hf model

I use the command “git clone $url”

Where  
url = [https://huggingface.com/meta-llama/Llama-2-7b-hf](https://huggingface.com/meta-llama/Llama-2-7b-hf)

And it has worked for other models but doesnt work when I try to clone the above Meta model

I get the error "could not read username for ‘[https://huggingface.co](https://huggingface.co)’: terminal prompts disabled

Any idea what could be wrong and how it can be fixed.  
Thanks in advance for your responses.

---

<div class="post-metadata">

**Author:** ![evanpria](https://avatars.discourse-cdn.com/v4/letter/e/ec9cab/32.png) [@evanpria](https://discuss.huggingface.co/u/evanpria)\
**Post date:** [March 15, 2024, 4:20am UTC](https://discuss.huggingface.co/t/unable-to-read-username-for-https-huggingface-co/55450/2 "2024-03-15T04:20:12Z")

</div>

same i have same problem in jupyter lab

---

<div class="post-metadata">

**Author:** ![Burr-di](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@Burr-di](https://discuss.huggingface.co/u/Burr-di)\
**Post date:** [May 29, 2024, 12:48pm UTC](https://discuss.huggingface.co/t/unable-to-read-username-for-https-huggingface-co/55450/3 "2024-05-29T12:48:30Z")

</div>

I also have this problem!  
It’s solved by using the follow commands

```auto
pip install huggingface_hub

from huggingface_hub import notebook_login

notebook_login()

```

then input your Token of your huggingface amount, the problem will be solved.

---

<div class="post-metadata">

**Author:** ![anon20178564](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@anon20178564](https://discuss.huggingface.co/u/anon20178564)\
**Post date:** [October 29, 2024, 12:34am UTC](https://discuss.huggingface.co/t/unable-to-read-username-for-https-huggingface-co/55450/4 "2024-10-29T00:34:11Z")

</div>

> [@Burr-di](#):
>
> en input your Token of your huggingface amount, the proble

Doesn’t work for me

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [October 29, 2024, 12:57am UTC](https://discuss.huggingface.co/t/unable-to-read-username-for-https-huggingface-co/55450/5 "2024-10-29T00:57:04Z")

</div>

The gated model can only be used with tokens from pre-authorized accounts.

> **[meta-llama/Llama-2-7b-hf · Hugging Face](https://huggingface.co/meta-llama/Llama-2-7b-hf)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

> [@How to use gated models?](https://discuss.huggingface.co/t/how-to-use-gated-models/53234/4):
>
> when can I get the approval from hugging face it has been two days if anyone know to can I contact them please reply to me

> **[Gated models](https://huggingface.co/docs/hub/models-gated)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

---

<div class="post-metadata">

**Author:** ![jindrahelcl](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jindrahelcl](https://discuss.huggingface.co/u/jindrahelcl)\
**Post date:** [November 20, 2025, 3:48pm UTC](https://discuss.huggingface.co/t/unable-to-read-username-for-https-huggingface-co/55450/6 "2025-11-20T15:48:24Z")

</div>

For all people still wondering how to do this with git, you can just say:

`git clone https://username:token@huggingface.co/gated/model`

Assuming that your `token` is associated with an account that has access to the repo.  
Disclaimer: Tested on a dataset repo, not a model repo.
