2013年9月24日 星期二

[GitHub相關] 使用git push 出現 "you can't push to git use https...." 的解決方式

Git hub 前面基本設定之後,最後要git push xxxxxxxx  master 時,

出現以下:
fatal: remote error: 
You can't push to git://github.com/my_user_name/my_repo.git
Use git@github.com:my_user_name/my_repo.git

原因是因為 git 是 Read-Only , 叫你使用https的方式存取,

故你若要使用 git 來做存取 , 你必須要打通SSH key 來加入到你的GitHub帳號,

照著以下簡單步驟做就可以使用git push 嚕
https://help.github.com/articles/generating-ssh-keys








當然若你要使用https也是可以(就不用SSH key了),但是可能還是會有問題,會出現

"error: The requested URL returned error: 403 while accessing https://github.com/JackABK/rtenv.git/info/refs"

請參照這裡解決:
http://askubuntu.com/questions/186847/error-gnutls-handshake-falied

不過還是介意自己產生ㄧ組SSH key 加入到自己Git Hub帳號吧!!













沒有留言:

張貼留言