I have 2 accounts: one personal and another which is linked to the org account. Both are private. What I have noticed is that I was able to push content into the org account with my personal account although the personal account is not part of the org account. How is this possible? Shouldn’t this action have thrown an “invalid/incorrect user” error or something similar.
Also I notice that there is no account separation to store the user token in ~/.huggingface/token. This results in one token overwriting the other.
The grey colored icon is the personal account; this is a screenshot of the org repository
Hi, whatever you use as
git.username is orthogonal to which token you use to push to a remote (same as on GitHub, BTW)
Meaning your token has write access to the repo, but the account linked from one of the commits is the other one.
Hope this helps!
About supporting multiple accounts at the same time in
~/.huggingface/token , what i would suggest is to just adapt your code to use differnt tokens then. I’m still cc’ing @Wauplin in case he has seen other instances of this feedback.
Thanks for your reply!
I have a couple of follow up queries
“”“Meaning your token has write access to the repo, but the account linked from one of the commits is the other one.”“”
If I understood you correctly, as long as the token has write access, the account could be any of the n HF accounts a user has?
I made a mistake assuming the other contributor was from my personal HF account. It is actually my GitHub account. In this case, is it still valid for HF Hub to validate the push given that the GitHub account’s email is not registered on Hugging Face Hub?
How does one manage multiple HF accounts?
No, what i mean is that, as long as the token has write access, you can git-commit as any arbitrary user: