簡體   English   中英

GIT 權限被拒絕(公鑰) - 致命無法從遠程存儲庫讀取

[英]GIT permission denied (publickey) - Fatal could not read from remote repository

我有ssh -T git@github.com命令返回成功驗證。
我也有ssh-add -l -E sha256返回 output。

但是git push -u origin main返回

***@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

誰能幫我?

You are adding as a remote an HTTPS URL ( https://github.com/saumyaphilip/mgc_web.git )

這意味着您的 SSH 密鑰根本沒有使用。

至少嘗試切換到 SSH:

cd /path/to/repository
git remote set-url origin git@github.com:saumyaphilip/mgc_web.git

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM