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

robotfactory 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

doucetj commented Dec 12, 2017

Also exactly what I needed, Thank you

@koutsenko

This comment has been minimized.

Copy link

koutsenko commented Feb 13, 2018

how to revert that ? :)

@alvaropinot

This comment has been minimized.

Copy link

alvaropinot 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

wizofe commented May 9, 2018

Oh my days, saved my life. Thanks!

@duck2

This comment has been minimized.

Copy link

duck2 commented Aug 15, 2018

thxthx

@g10guang

This comment has been minimized.

Copy link

g10guang 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

rahulbhooteshwar commented Jan 14, 2019

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

@davidhsv

This comment has been minimized.

Copy link

davidhsv commented Feb 13, 2019

Man, I love you, marry me!

@amitsomani2000

This comment has been minimized.

Copy link

amitsomani2000 commented Mar 16, 2019

Thanks a lot @taoyuan. It was a saviour.

@AndresFelipeCano

This comment has been minimized.

Copy link

AndresFelipeCano 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

pmckeegan commented Apr 5, 2019

works, thanks!

@polishcode

This comment has been minimized.

Copy link

polishcode commented Apr 25, 2019

Thank you @taoyuan.

@joseboretto

This comment has been minimized.

Copy link

joseboretto 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

leemeans commented May 16, 2019

Thanks, works perfect. @taoyuan

@Phexcom

This comment has been minimized.

Copy link

Phexcom 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

erkanzileli commented Aug 9, 2019

You are saved my day. Thank you!

@Sarra-yocto

This comment has been minimized.

Copy link

Sarra-yocto 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 ? :(

@quangtd92

This comment has been minimized.

Copy link

quangtd92 commented Aug 30, 2019

THANKS YOU!!

@t3chn0m4g3

This comment has been minimized.

Copy link

t3chn0m4g3 commented Oct 22, 2019

Thank you!

@furqon

This comment has been minimized.

Copy link

furqon commented Nov 4, 2019

wow, thank you!

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.