2013-01-10 59 views
1

將應用推送到github時出現問題。這就是我在命令行輸入的內容。希望這只是我能解決的一個小問題,謝謝。試圖推送到git存儲庫的問題

git init 
git add README.md 
git commit -m "first commit" 
git remote add origin [email protected]:travi5567/first_app.git 
git push -u origin master 

這是我的錯誤:

Traviss-MacBook-Pro:sample_app Travis$ git push -u origin master 
Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

回答

2

如果你不知道如何使用SSH密鑰或不願意,你也可以使用https遠程像這樣:

git remote add origin https://[email protected]/travis5567/first_app.git 
git push origin master 
Password for travis5567: <enter your password> 
# regular output from a git push