我正在尝试连接到学校的 github,但端口 443 被阻止了。
管理员告诉我改用端口 9418,我认为这是 git 协议(protocol)的默认端口。
但是在 git bash (windows) 中,如果我尝试执行 git remote set-url origin git://github.com/me/myrepo.git
并进行推送,它会告诉我我无法推送到此 URL,而是使用 https://github...
。
如何配置 git 以使用端口 9418?
最佳答案
来自 github documentation :
You can only push to one of two writeable protocol URL addresses. Those two include an SSH URL like git@github.com:user/repo.git or HTTPS URL like https://github.com/user/repo.git.
所以你需要开放22或443端 Eloquent 能工作,git协议(protocol)是只读的。
关于Git - 在 github 上使用端口 9418 进行远程操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19023511/