About publickey: I configured it a year ago and it works fine!
However, I can't push
to any gitee repositories from yesterday.
Permission denied (publickey)
But it works well in github?! (I'm sure I'm using the same publickey and it was added before)
After running $ ssh -Tvvv [email protected]
, I got the following message:
# other infos
debug1: Trying private key: /c/Users/57715/.ssh/id_dsa
debug3: no such identity: /c/Users/57715/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /c/Users/57715/.ssh/id_ecdsa
debug3: no such identity: /c/Users/57715/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /c/Users/57715/.ssh/id_ecdsa_sk
debug3: no such identity: /c/Users/57715/.ssh/id_ecdsa_sk: No such file or directory
debug1: Trying private key: /c/Users/57715/.ssh/id_ed25519
debug3: no such identity: /c/Users/57715/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: /c/Users/57715/.ssh/id_ed25519_sk
debug3: no such identity: /c/Users/57715/.ssh/id_ed25519_sk: No such file or directory
debug1: Trying private key: /c/Users/57715/.ssh/id_xmss
debug3: no such identity: /c/Users/57715/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey).
I've been searching for that answer all day, could somebody help to solve the tough problem?
I would appreciate it very much!
CodePudding user response:
First, if this was working before, that would mean you are sharing one SSH key between multiple destinations, which is not a good practice.
Then create a %USERPROFILE%\.ssh\config
file, with in it:
Host gitee.com
HostkeyAlgorithms ssh-rsa
PubkeyAcceptedAlgorithms ssh-rsa
Test this is working with ssh -T [email protected]
Finally, in the root folder of your local repository:
git remote set-url origin giteee:<me>/<myProject>