Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Force git to use https:// instead of git://
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
@robotfactory

This comment has been minimized.

Copy link

commented Jul 18, 2017

Thank you for this. Great for getting around a poorly configured corporate web filtering system.

@doucetj

This comment has been minimized.

Copy link

commented Dec 12, 2017

Also exactly what I needed, Thank you

@koutsenko

This comment has been minimized.

Copy link

commented Feb 13, 2018

how to revert that ? :)

@alvaropinot

This comment has been minimized.

Copy link

commented Feb 25, 2018

@koutsenko You can edit the whole global config file by running git config --global --edit and delete the line manually, should be at the bottom :)

@wizofe

This comment has been minimized.

Copy link

commented May 9, 2018

Oh my days, saved my life. Thanks!

@duck2

This comment has been minimized.

Copy link

commented Aug 15, 2018

thxthx

@g10guang

This comment has been minimized.

Copy link

commented Oct 24, 2018

What about "ssh://" prefix?

Like ssh://user@git.example.com:8080/user/project

@rahulbhooteshwar

This comment has been minimized.

Copy link

commented Jan 14, 2019

Thanks @taoyuan a lot. It worked like a charm.

@davidhsv

This comment has been minimized.

Copy link

commented Feb 13, 2019

Man, I love you, marry me!

@amitsomani2000

This comment has been minimized.

Copy link

commented Mar 16, 2019

Thanks a lot @taoyuan. It was a saviour.

@AndresFelipeCano

This comment has been minimized.

Copy link

commented Apr 2, 2019

👍 If you know some place to find SSH Authentication problem solution, please let my know.

@pmckeegan

This comment has been minimized.

Copy link

commented Apr 5, 2019

works, thanks!

@polishcode

This comment has been minimized.

Copy link

commented Apr 25, 2019

Thank you @taoyuan.

@joseboretto

This comment has been minimized.

Copy link

commented May 15, 2019

how to revert that ? :)

git config --global --unset-all url.https://github.com/.insteadof
git config --global --unset-all url.https://.insteadof

Check it with:
git config -l

@leemeans

This comment has been minimized.

Copy link

commented May 16, 2019

Thanks, works perfect. @taoyuan

@Phexcom

This comment has been minimized.

Copy link

commented Jun 14, 2019

how to revert that ? :)

git config --global --unset-all url.https://github.com/.insteadof
git config --global --unset-all url.https://.insteadof

Check it with:
git config -l

@joseboretto
Wow you just saved my life. 2 hours of headache try to change remote from https to ssh

@erkanzileli

This comment has been minimized.

Copy link

commented Aug 9, 2019

You are saved my day. Thank you!

@Sarra-yocto

This comment has been minimized.

Copy link

commented Aug 15, 2019

hey
can anyone help me ?
it didn't work out with git://git.yoctoproject.org/poky/, when this link is forced to turn to http://git.yoctoproject.org/poky/ i get this error :

fatal: repository 'https://git.yoctoproject.org/poky/' not found

am stuck there can anyone help me please ? :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.