Getting started with repositories

I was following the documentation Repositories to create a private repository, and then subsequently clone it. I ran the hugginface_hub cli command and entered the user access token; the token was successfully added to the git credentials and to the token file in the ~/.huggingface directory. However, when I tried to clone the repository, git threw a “cannot find repo” error. I thought this had something to do with another personal account that I had created.
I checked the keychain and noted that huggingace had created 2 accounts: one against the personal email id and another with account name hf_user. So, I wasn’t sure which account was updated with the new credentials. I deleted both accounts, and reran the huggingface_hub command; it executed successfully. This time, in the keychain, I could see an account with user hf_user. I tried to clone the repo but it failed with the same error. I deleted the keychain, and ran the git clone command directly; this time I was prompted to enter my credentials, which I did, and I was able to successfully clone the repo. In the keychain, I could see the account with my official email id.

So, my questions are: 1) What exactly was the reason for the failure?
2) Do we need this command to push code to the hub when using git commands? Or is this used with the python API?