Git - 在 github 上使用端口 9418 进行远程操作

标签 git bash github

我正在尝试连接到学校的 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/

相关文章:

git - 字符串 'Head' 不代表修订号

git - SVN转Git时如何修改提交信息?

git - 如何在 Git 中查看分支的远程更改?

git - 为什么 git 协议(protocol)比 git-http-backend 产生更多的对象?

bash - 在 bash 部署中将初始用户插入到我的数据库中

linux - 即使使用 #!/bin/bash shebang,bash 也不会执行 'at -f foo.sh' 命令

linux - 处理特殊情况以解压并 cd 到文件夹中

json - 为什么 GitHub API 不返回存储库的所有分支?

git - 如何识别 Jenkins 管道中的 merge 提交?

Github markdown,表格单元格中代码块的语法高亮