Ruby on rails 尝试推送到git存储库时出现问题

Ruby on rails 尝试推送到git存储库时出现问题,ruby-on-rails,git,Ruby On Rails,Git,将应用程序推送到github时出现问题。这是我在命令行中输入的内容。希望这只是我能解决的一个小问题,谢谢 git init git add README.md git commit -m "first commit" git remote add origin git@github.com:travi5567/first_app.git git push -u origin master 这是我得到的错误: Traviss-MacBook-Pro:sample_app Travis$ git

将应用程序推送到github时出现问题。这是我在命令行中输入的内容。希望这只是我能解决的一个小问题,谢谢

git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com: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.

GitHub使用SSH密钥配置对git存储库的访问。如果您是所有者,您可以推送到repo,但是您需要告诉git您的SSH密钥,以便他们首先知道您是谁


GitHub网站上对此进行了详细解释-

GitHub使用SSH密钥配置对git存储库的访问。如果您是所有者,您可以推送到repo,但是您需要告诉git您的SSH密钥,以便他们首先知道您是谁


GitHub网站上已对此进行了详细说明-

如果您不知道如何使用SSH密钥,或者不想使用SSH密钥,也可以使用https远程密钥,如下所示:

git remote add origin https://travis5567@github.com/travis5567/first_app.git
git push origin master
Password for travis5567: <enter your password>
# regular output from a git push
git远程添加源https://travis5567@github.com/travis5567/first_app.git
git推送源主机
travis5567的密码:
#git推送的常规输出

如果您不知道如何使用SSH密钥或不想使用SSH密钥,也可以使用
https
远程密钥,如下所示:

git remote add origin https://travis5567@github.com/travis5567/first_app.git
git push origin master
Password for travis5567: <enter your password>
# regular output from a git push
git远程添加源https://travis5567@github.com/travis5567/first_app.git
git推送源主机
travis5567的密码:
#git推送的常规输出