我刚刚安装了Windows版Git(Git版本2.11.0)。我使用的是Windows 10,并且位于不允许SSH在标准端口22上运行的网络中。
自然,安装的Git无法连接到位于GitLab中的远程存储库。
我希望我可以在Windows Git上使用HTTPS而不是SSH,但是我找不到它是否可用或如何使用。
a)是否可以在HTTPS模式下运行Git Windows?如何配置呢?
b)如果没有,是否可以更改默认的Git SSH端口和Gitlab ssh端口?
最佳答案
a) Is there an option to run Git Windows in HTTPS mode ? How to configure it ?
您只需使用GitLab存储库的https网址即可:
git clone https://<gitlab server>/user/repo
b) If not, is there a way to change the default Git SSH port and Gitlab ssh port?
那将在GitLab服务器端,但通常不需要它,因为GitLab由Apache或NGiNX http服务器管理,它们将侦听https查询。
其他选择是使用ngrok and tunnel ssh(请参阅ngrok)
或使用ssh ProxyCommand to use that tunnel。
关于git - Git Windows HTTPS远程连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41310126/