我是 github 的常客用户,但是当我使用学校的网络时(我住在校外),不会让我推动它。我模糊地认为这是由于使用 git 协议而不是 HTTPS 造成的,但我并不肯定。
我将不胜感激有关解决此问题的任何见解!
I'm a frequent github user, but when I'm on my school's network (I live off campus), it won't let me push it. I have a vague belief that this is due to using the git
protocol, instead of HTTPS
, but am not positive.
I'd appreciate any insight as to ways around this!
发布评论
评论(2)
我确认使用 非标准 9418 端口 的 git 协议经常被阻止。
git+ssh 可能工作,但传出 ssh 访问也经常被阻止。
因此,http仍然是您唯一的选择,使用智能http,如“使用
git remote --set-url
命令来更新您的原始URL。I confirm that the git protocol, using a non-standard 9418 port is often blocked.
git+ssh might work but outgoing ssh access are often blocked as well.
So http remains your only option, using smart http, as described in "Cannot get Http on git to work".
You can use a
git remote --set-url
command to update your origin URL.可能是防火墙问题,但 https 应该基本上可以访问。请注意,git 协议是只读的,无论如何你都无法推送它。尝试将原始 URL 更改为 https(github 有三种协议 - ssh、https 和 git):
It might be firewall issues, but https should mostly be accessible. Note that git protocol is read only, you can't push to it anyway. Try changing origin URL to the https one ( github has three protocols - ssh, https and git ):