解決fatal:remote error:You can't push to git://github.com/username/*.git問題的辦法
今天Git push的時候
1
2
3
|
fatal:remote error: You can't push to git: //github .com /username/ *.git Use [email protected]:username/*.git |
看來我是沒有權限push啊。
解決方法:
1
2
|
git remote rm origin |
接下來就可以push了。
這個問題一般是clone的時候選擇的協議導致的。如果是用的git://github.com/userna/userrepository.git。只有讀的權限,不能寫入。導致不能push。
要用ssh協議才能push所以clone用[email protected]:username/userrepository.git
用ssh還必須要創建一個SSH Key。并把公鑰填寫到用戶在GitHub的信息里。具體看GitHub的相應幫助
感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!