2013-10-13 73 views
2

每次嘗試從命令行提交對GitHub的更改時(在遵循GitHub的教程之後),我得到erorr「致命的:我不處理協議」https:https '「從命令行提交Github時出錯

我正在關注GitHub上的這篇簡短教程。

Create a new repository on the command line 
touch README.md 
git init 
git add README.md 
git commit -m "first commit" 
git remote add origin https://github.com/tuzion/baby-companion.git 
git push -u origin master 

謝謝!

- 我在Mac上,順便說一句。

+0

使用Git的開頭的網址:不是。 – lego

+0

你有什麼版本的git?它可能不支持https協議... –

+0

@lego當我這樣做時,它說「致命的:遠程原點已經存在。」 我應該指定我在'git push -u origin master'步驟後得到錯誤 – tuzion

回答

0

您是否將SSH密鑰輸入到Github帳戶設置中?

檢查您的帳戶設置/ SSH密鑰..

+0

https://help.github.com/articles/generating-ssh-keys – Lisa

+0

第一個該行表示「如果您決定不使用推薦的HTTPS方法[...]」。我以爲我是?在我嘗試生成密鑰之前有沒有辦法啓用它?我寧願只使用HTTPS。 – tuzion