關于 publickey:我一年前配置了它,它作業正常!

但是,我不能從昨天開始push訪問任何gitee存盤庫。
權限被拒絕(公鑰)
但它在github 中運行良好?!(我確定我使用的是相同的公鑰并且它是之前添加的)

運行后$ ssh -Tvvv [email protected],我收到以下訊息:

# 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).
我一整天都在尋找那個答案,有人可以幫助解決這個棘手的問題嗎?
我將不勝感激!
uj5u.com熱心網友回復:
首先,如果這在以前有效,則意味著您在多個目的地之間共享一個 SSH 密鑰,這不是一個好習慣。
如“
然后創建一個%USERPROFILE%\.ssh\config檔案,其中包含:
Host gitee.com
HostkeyAlgorithms ssh-rsa
PubkeyAcceptedAlgorithms ssh-rsa
測驗這是與 ssh -T [email protected]
最后,在本地存盤庫的根檔案夾中:
git remote set-url origin giteee:<me>/<myProject>
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/349272.html
