爲什麼呢,怕是用了個假的SSH KEY 吧。
NONONO。
因爲 git clone 你用的是 https 而不是ssh。
什麼你不信?
輸入: git config -l
結果:卡卡打臉
拿github的一個工程項目來說:
https:
ssh:
怎麼解決:
移除origin: git remote remove origin
設置origin: git remote add origin [SSH地址]
重新設置track branch: git branch --set-upstream-to=origin/[branch_name] [branch_name]
舉例:
git remote remove origin git remote add origin ssh://[email protected]:10022/xxx.git git branch --set-upstream-to=origin/mybranch mybranch