1. 程式人生 > >git push 程式碼報錯 Pushing to Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

git push 程式碼報錯 Pushing to Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

背景:從openshift上clone程式碼到本地,修改程式碼push報錯
Pushing to Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
這裡寫圖片描述

解決方法:
在網上查到原因要新增私鑰。
先用Git Gui快取改動,提交。(svn用多了,習慣gui操作)
這裡寫圖片描述

啟動Git Bash

ssh-agent
#新增私鑰  輸入密碼
ssh-add "E:\Program Files\Git\.ssh\id_rsa"
#[push 命令詳解](http://www.yiibai.com/git/git_push.html)
git push origin

這裡寫圖片描述