Mendes
Mendes

Reputation: 18441

Git Windows HTTPS remote connection

I just installed Git for Windows (Git Version 2.11.0). I´m using Windows 10 and I am behind a network that does not allow SSH to run on standard port 22.

Naturally Git as installed is not being able to connect to my remote repository, that is located in GitLab.

I wish I could use HTTPS instead of SSH on my Windows Git, but I can´t find out if it is available or how to do it.

a) Is there an option to run Git Windows in HTTPS mode ? How to configure it ?

b) If not, is there a way to change the default Git SSH port and Gitlab ssh port?

Upvotes: 1

Views: 294

Answers (1)

VonC
VonC

Reputation: 1323045

a) Is there an option to run Git Windows in HTTPS mode ? How to configure it ?

You simply use the https url of your GitLab repo:

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?

That would be on the GitLab server side, but usually you don't need this, as GitLab is managed by an Apache or NGiNX http server, which will listen to https queries.

The other alternatives would be to use ngrok and tunnel ssh (see ngrok)
Or use the ssh ProxyCommand to use that tunnel.

Upvotes: 1

Related Questions