I am under a proxy and I am pushing in to git successfully for quite a while.
Now I am not able to push into git all of a sudden.
I have set the RSA key and the prox
Changing the repo url from ssh to https is not very meaningful to me. As I prefer ssh
over https
because of some sort of extra benefits which I don't want to discard. Above answers are pretty good and accurate. If you face this problem in GitLab, please go to their official documentation page and change your config file like that.
Host gitlab.com
Hostname altssh.gitlab.com
User git
Port 443
PreferredAuthentications publickey
IdentityFile ~/.ssh/gitlab
The answer above gave me the information needed to resolve this issue. In my case the url was incorrectly starting with ssh:///
To check the url in your git config is correct, open the git config file :-
git config --local -e
Check the url entry. It should NOT have ssh:/// at the start.
Incorrect entry:
url = ssh:///git@github.com:username/repo.git
Correct entry:
url = git@github.com:username/repo.git
If your url is correct, then the next step would be to try the answer above that suggests changing protocol to http.
I had this issue on a server of mine that was set up with it's regular IP and a failover IP. The failover IP did not point to the server at this time. I had to remove the failover IP from the server configuration in /etc/netplan/01-netcfg.yaml
. Pointing the failover IP to that server would have probably solved the issue as well.
For me, the problem was from ISP side. The Port number was not enabled by the Internet Service Provider. So asked them to enable the port number over my network and it started working.
Only to test: Connect to mobile hotspot and type ssh -T git@bitbucket.org or git pull.
If it works, then ask your ISP to enable the port.
Restart computer solved it for me.
Git version: 2.27.0.windows.1
OS version: Windows 10 v1909