Git using https instead of ssh

The other day i found out our firewall blocks outgoing traffic except port 80 and 443.
(HTTP & HTTPS)

This can become a problem if you want to use a repository which uses ssh.
Maybe because you configured ssh access in the first place.
Or maybe because a transitive project uses ssh.

The problem occurred to me because i started a new project at home and pushed it to bitbucket using ssh.
Unfortunately the company blocks pretty much all outgoing traffic on ports other than 80 and 443.

The obvious solution:

git config --global url."https://".insteadOf git://

Like described here:

Hm, i didn’t want affect each and every git project on my system.

There is a simple project wide setting to make git use https instead of ssh:

add this to your ./git/config
[url "https://"]
insteadOf = git://


mine startes with:

[url "https://"]
insteadOf = git://
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
...

I found it here:
Can’t force git to use https:// instead of git:// #5257

I hope it works for you.

Advertisements

About javavolker71

when i do not write posts on this blog, don't work on or try to break my code i'm spending a reasonable amount of time
This entry was posted in Uncategorized and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s