git - Git Windows HTTPS远程连接

标签 git ssh https gitlab

我刚刚安装了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/

相关文章:

android - 如何将项目恢复到android studio中的先前提交

GitKraken: "This repository requires LFS but you do not have LFS installed"

Git 预推送 Hook 在管道传输到 xclip 后挂起

python - 如何使用 SCP 或 SSH 在 Python (paramiko) 中递归地将完整目录复制到远程服务器?

ssh - 通过 ssh-tunnel 从本地计算机连接到远程服务器

git - 如何使用 git am 从电子邮件应用补丁?

git - 使用 SSH 将 Github 存储库部署到服务器(网络空间)

nginx - 使用 Clojure 和 Ring 的 HTTPS 请求

c# - 443 端口的备用端口是什么?

ssl - Websocket 证书 CERT_DATE_INVALID