我正在尝试将我的项目上传到Github,但是我不明白为什么会出现以下错误:
ssh: connect to host github.com port 22: Operation timed out
fatal: The remote end hung up unexpectedly
当我执行以下操作时:
git push origin master
我一直按照github生成的准确指示进行操作:
Next steps:
mkdir UniqCheck
cd UniqCheck
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:dylandrop/UniqCheck.git
git push -u origin master
我不知道为什么会出现这个错误。我之前已经成功地推送和拉取了来自另一个 Git 存储库(不是我拥有的)的项目。迄今为止,我看到的所有其他问题都没有起作用,或者完全匹配我的问题。
编辑: 此外,也许有趣的是,当我执行 git config --get-regexp '^(remote|branch).' 时,我得到的结果是:
remote.origin.url git@github.com:dylandrop/UniqCheck.git
remote.origin.fetch +refs/heads/*:refs/remotes/origin/*