记录下本地git clone, git push 2个github账号的repository, git push 到另一个github账号的repository报错(fatal: unable to access 'https://github.com/raojiahong...': Failed to connect to github.com port 443: Timed out)的解决办法。
git 操作步骤:
提前生成了jiahong888账号的publickey,执行如下代码clone iris-demo,项目,账号,邮箱需替换成自己的:
git clone git@github.com:jiahong888/iris-demo.git git config --global user.name 'jiahong888' git config --global user.email 'jiahong888@qq.com'
修改iris-demo项目的代码,可正常提交:
git commit -m 'comment' git push
clone raojiahong888账号下的项目:
git clone https://github.com/raojiahong888/go-zero-demo.git
修改go-zero-demo项目的代码,commit然后push:
git commit -m 'comment' git push
当remote 地址是https时,push 报错: fatal: unable to access 'https://github.com/raojiahong...': Failed to connect to github.com port 443: Timed out.
当remote 地址是git@github.com时,push 报错:ERROR: Permission to raojiahong888/go-zero-demo.git denied to jiahong888.
fatal: Could not read from remote repository.
(为避免冲突,jiahong888账号下项目的仓库地址使用git@github.com时,raojiahong888账号下项目的仓库地址使用https。)通过取消全局代理, 解决(Failed to connect to github.com port 443: Timed out)问题 :
git config --global --unset http.proxy git config --global --unset https.proxy
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。