1

我尝试使用以下命令将我的代码推送到 github:

git remote add https://github.com/user/sample_app.git

git push origin master

并得到以下错误:

error: failed to push some refs to 'https://github.com/user/sample_app.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again.  See the 'non-fast forward'
section of 'git push --help' for details.

要查看错误是否在我输入的遥控器上:

git pull

并得到以下错误:

error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/sub1010/sample_app.git/info/refs
fatal: HTTP request failed

为什么我不能将我的代码推送到 github?

4

2 回答 2

0

尝试添加 ssh repo 而不是 http repo

git remote rm sample_app
git remote add git@github.com/user/sample_app.git
于 2012-06-05T19:38:14.867 回答
0

Github 有关于设置存储库并确保您可以连接它的详细说明。链接:Github SetupGithub Create A Repo

于 2012-06-05T21:29:30.537 回答