Skip to content

Instantly share code, notes, and snippets.

@taoyuan
Last active September 29, 2025 18:11
Show Gist options
  • Save taoyuan/bfa3ff87e4b5611b5cbe to your computer and use it in GitHub Desktop.
Save taoyuan/bfa3ff87e4b5611b5cbe to your computer and use it in GitHub Desktop.

Revisions

  1. 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 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://