Skip to content

Instantly share code, notes, and snippets.

@natehouk
Forked from taoyuan/npm-using-https-for-git.sh
Created August 20, 2023 06:23
Show Gist options
  • Save natehouk/1dab6217f1810719c43be1d93f554a23 to your computer and use it in GitHub Desktop.
Save natehouk/1dab6217f1810719c43be1d93f554a23 to your computer and use it in GitHub Desktop.

Revisions

  1. @taoyuan taoyuan revised this gist Apr 29, 2020. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion npm-using-https-for-git.sh
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,7 @@
    # npm using https for git
    git config --global url."https://github.com/".insteadOf [email protected]:
    git config --global url."https://".insteadOf git://
    git config --global url."https://".insteadOf git://

    # npm using git for https
    git config --global url."[email protected]:".insteadOf https://github.com/
    git config --global url."git://".insteadOf https://
  2. @taoyuan taoyuan created this gist Feb 4, 2016.
    2 changes: 2 additions & 0 deletions npm-using-https-for-git.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    git config --global url."https://github.com/".insteadOf [email protected]:
    git config --global url."https://".insteadOf git://