Repo access with multiple HF accounts
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 repositoryimage2474×1130 271 KB
2023-01-08T15:56:28Z
Hi, whatever you use asgit.usernameis 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@Wauplinin case he has seen other instances of this feedback.
2023-01-09T12:02:04Z
@julien-cThanks 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?
2023-01-09T18:06:12Z
sl02:as long as the token has write accessNo, what i mean is that, as long as the token has write access, you can git-commit as any arbitrary user:stackoverflow.comGit: how to commit as someone else?git, githubanswered bySergo Pasoevion05:56AM - 21 Dec 17 UTC