Git的 - 对于在github远程使用端口9418 [英] Git - Use port 9418 for remote on github
问题描述
我想在学校连接到GitHub上,但443端口被封锁。
I am trying to connect to github at school but port 443 is blocked.
管理员告诉我使用的端口,而不是9418,我相信是Git协议的默认端口。
The admin told me to use port 9418 instead which I believe is the default port for the git protocol.
然而在Git的bash(Windows)如果我尝试做混帐远程设置URL起源的git://github.com/me/myrepo.git
,并做了推,它告诉我,我不能推到这个网址,并使用的https:// github上...
而不是
But in git bash (windows) if i try to do git remote set-url origin git://github.com/me/myrepo.git
and do a push, it tells me I can't push to this URL, and to use https://github...
instead.
如何配置的git使用端口9418?
How can I configure git to use port 9418 ?
推荐答案
从的 github上文档:
您只能推两个写协议的URL地址中的一个。这两个都包含有SSH URL像git@github.com:用户/ repo.git或HTTPS URL如 https://github.com/用户/ repo.git 。
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工作,Git协议是只读的。
So you need open port 22 or 443 to work, git protocol is read only.
这篇关于Git的 - 对于在github远程使用端口9418的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!