2.git 连接报"ssh: connect to host github.com port 22: Connection timed out"错误
2017-11-27 13:18
4255 查看
FAQ:
1.gitee 无法pull仓库refusing to merge unrelated histories
我之前在gitee上创建一个project后,想push本地的项目至gitee仓库,按照官方操作如下:
创建 git 仓库:
已有项目?
当执行
需要在pull 后面添加 --allow-unrelated-histories
git pull origin master --allow-unrelated-histories
执行完成成后在执行push操作即可。
http://blog.csdn.net/woshuo424479703/article/details/78643880
1.gitee 无法pull仓库refusing to merge unrelated histories
我之前在gitee上创建一个project后,想push本地的项目至gitee仓库,按照官方操作如下:
简易的命令行入门教程:
Git 全局设置:git config --global user.name "wusiquan" git config --global user.email "wusiquan@aliyun.com"
创建 git 仓库:
mkdir springboot-demo cd springboot-demo git init touch README.md git add README.md git commit -m "first commit" git remote add origin git@gitee.com:wusiquan/springboot-demo.git git push -u origin master
已有项目?
cd existing_git_repo git remote add origin git@gitee.com:wusiquan/springboot-demo.git git push -u origin master
当执行
git push -u origin master的时候出现该错误,后来发现是因为本地的project和远程仓库的project的提交histories并不相关,所以
需要在pull 后面添加 --allow-unrelated-histories
git pull origin master --allow-unrelated-histories
执行完成成后在执行push操作即可。
2.git 连接报"ssh: connect to host github.com port 22: Connection timed out"错误
原因是我本地存在多个git账号,需要为每个git账号配置一个指定的ssh文件,解决请看http://blog.csdn.net/woshuo424479703/article/details/78643880
相关文章推荐
- github连接报"ssh: connect to host github.com port 22: Connection timed out"错误
- github连接报"ssh: connect to host github.com port 22: Connection timed out"错误
- ssh: connect to host github.com port 22: Connection timed out
- git clone时出现ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from
- 解决ssh-connect-to-host-github-com-port-22-connection-timed-out
- ssh: connect to host github.com port 22: Connection timed out
- 解决ssh-connect-to-host-github-com-port-22-connection-timed-out
- 解决ssh-connect-to-host-github-com-port-22-connection-timed-out
- connect to host ssh.github.com port 22: Connection timed out解决方法
- SSH连接GitHub出现 ssh: connect to host github.com port 22: Connection refused解决方法
- Git克隆提交出现“ssh: connect to host github.com port 22: Operation timed out fatal”问题
- GIT报错:connect to host github.com port 22: Connection timed out
- 解决ssh: connect to host gitlab.com port 22: Connection timed out
- 使用云主机配置互信后ssh: connect to host hadoop port 22: Connection timed out
- 【解决】ssh: connect to host slave port 22: Connection timed out的问题
- mac 配置 ssh 到git (Could not resolve hostname github.com, Failed to connect to github.com port 443 Operation timed out)
- 大数据【关于ssh: connect to host master port 22: Connection timed out问题的总结】
- Git配置非22端口,解决:ssh: connect to host xxx port 22: Connection timed out fatal: The remote end hung up unexpectedly
- ubuntu 14.04下scp传输文件出现ssh: connect to host ***port 22: Connection timed out
- 关于ssh: connect to host master port 22: Connection timed out问题的总结