I don’t know if this is a bug, so I just posted it here to avoid cluttering up the issues on GitHub.
My username is A2va, but if I go to the hugginface.co/a2va it redirect to https://huggingface.co/A2va
But that doesn’t seem to be the case when pushing a model to the hub. For example the first snippet is failing, by throwing a exception “token doesn’t have the write permission”.
This is a delicate case.
As a rule, HF user names and repo names are case-sensitive.
The redirection is probably just a friendly feature.
If HF does that with uploads at the Hub, the worst that can happen is access to someone else’s repo with a similar name.
I would probably be safer with this spec as it is, but at least a Warning or a Maybe, for example, would be acceptable. I’ll leave it to you to decide if you want to report it or not.
P.S.
I recall that the case may be redirected, for example, if he/she renamed his/her username after creation. Maybe that is the case.