1

I'm trying to clone a repo over a local network using the git protocol, but am receiving the following error:

~/foobar$ git clone git://192.168.xxx.yyy/
Cloning into '192.168.xxx.yyy'...
fatal: unable to access 'https://192.168.xxx.yyy/': Failed to connect to 192.168.xxx.yyy port 443: Connection refused

A coworker was successfully able to clone using exactly the same command using a mac as a client (I'm using Ubuntu). Any idea why git clone seems to be trying to use https, or how to fix this?

1 Answer 1

2

You specify to use the git-protocol in your git clone command, but the error shows that git tried to use https.

This is probably an issue in your git client configuration. If your .gitconfig contains the following remove it

[url "https://"]   
    insteadOf = git://

See: https://coderwall.com/p/sitezg/force-git-to-clone-with-https-instead-of-git-urls

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks, but there is no such config in my .gitconfig. Is there anywhere else where this could be configured?
Maybe you could look for it in ~/.config/git or /etc/gitconfig
Yes, the setting was in /etc/gitconfig.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.