[英]Why does Git ask me to fill user credentials each time i pull or push changes?
我經常使用 Github 和 Git 並沒有遇到這個問題,直到幾天前我必須在每次推拉和此類命令之前輸入我的憑據兩次。 我嘗試了這些命令集-
git config --global credential.helper store
git config --global credential.helper cache
在嘗試了來自stackoverflow的許多命令后,我得到了這個錯誤。
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我能做些什么? 為什么我在 git 中突然遇到這個問題?
由於憑據助手無濟於事,如評論所述,請嘗試(假設基於 Linux 的操作系統)
export GIT_SSH_COMMAND='ssh -Tv'
cd /path/to/my/repo
git remote -v
git ls-remote
Double-check at the git remote -v
that origin is defined with an URL starting with git@github.com:...
, meaning an SSH URL.
嘗試將 URL 與git ls-remote
一起使用時,您將看到更多詳細信息:查找 SSH 密鑰。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.