【发布时间】:2015-11-25 18:12:36
【问题描述】:
我刚刚在 Ubuntu 机器上安装了 rails。我设置了 git 并创建了一个 ssh 密钥来链接到我的帐户。我创建了一个要提交的存储库,并创建了一个名为 first_app 的示例项目进行测试。当我提交时,它说一切都已提交,但我去了 github,但它不存在。我想把我的项目放在那里,但由于某种原因它没有连接。我已经用谷歌搜索了,我什么也没看到,所以这一定是我做的一些愚蠢的事情。有什么方法可以检查所有配置是否正确?
编辑:尝试设置远程地址,但它已经正确。它具有正确的 URL。
Edit2:这是终端中出现的内容:
jonny@MM061-JD:~/first_app$ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git@github.com:JonnyDoeInWisco/first_app.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
jonny@MM061-JD:~/first_app$ git remote -v
origin git@github.com:JonnyDoeInWisco/first_app.git (fetch)
origin git@github.com:JonnyDoeInWisco/first_app.git (push)
【问题讨论】:
-
你推送你的提交了吗?
-
是的,我做了,仍然没有。
-
编辑你的问题,@JonnyDoeInWisco 并输入
$ cat .git/config的结果。您的遥控器可能配置不正确 -
完成。如果我做一个 git log 它还会显示我所做的所有提交。
-
现在,您确定您已经设置了 SSH?