Skip to content

Instantly share code, notes, and snippets.

@dmitshur
Last active December 29, 2024 12:06
Show Gist options
  • Save dmitshur/6927554 to your computer and use it in GitHub Desktop.
Save dmitshur/6927554 to your computer and use it in GitHub Desktop.

Revisions

  1. dmitshur revised this gist Jul 14, 2024. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,9 @@
    **WARNING:** This gist was created in 2013 and targets the legacy GOPATH mode. If you're reading this in 2021 or later, you're likely better served by reading https://tip.golang.org/cmd/go/#hdr-Configuration_for_downloading_non_public_code and https://golang.org/ref/mod#private-modules.
    **WARNING:** If you're reading this in 2021 or later, you're likely better served by reading:

    - https://go.dev/cmd/go#hdr-Configuration_for_downloading_non_public_code
    - https://go.dev/ref/mod#private-modules

    (This gist was created in 2013 and targeted the legacy GOPATH mode.)

    ```bash
    $ ssh -A vm
  2. dmitshur revised this gist Feb 14, 2021. No changes.
  3. dmitshur revised this gist Feb 14, 2021. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    **WARNING:** This gist was created in 2013 and targets the legacy GOPATH mode. If you're reading this in 2021 or later, you're likely better served by reading https://tip.golang.org/cmd/go/#hdr-Configuration_for_downloading_non_public_code and https://golang.org/ref/mod#private-modules.

    ```bash
    $ ssh -A vm
    $ git config --global url."[email protected]:".insteadOf "https://github.com/"
    @@ -10,6 +12,6 @@ Success!

    Sources:

    - https://help.github.com/articles/which-remote-url-should-i-use #You can also use SSH agent forwarding with your deploy script to avoid managing keys on the server.
    - http://golang.org/doc/faq #Why does "go get" use HTTPS when cloning a repository?
    - https://www.kernel.org/pub/software/scm/git/docs/git-config.html #url.\<base\>.insteadOf
    - https://docs.github.com/en/developers/overview/using-ssh-agent-forwarding
    - https://golang.org/doc/faq#git_https
    - https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf
  4. @shurcooL shurcooL revised this gist Oct 11, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    ```bash
    $ ssh -A vm
    $ git config --global url."[email protected]:".insteadOf "https://github.com/"
    $ cat ~/.gitconfig
    [url "[email protected]:"]
    insteadOf = https://github.com/
  5. @shurcooL shurcooL revised this gist Oct 11, 2013. No changes.
  6. @shurcooL shurcooL revised this gist Oct 11, 2013. No changes.
  7. @shurcooL shurcooL revised this gist Oct 10, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    ```bash
    $ ssh -A vm
    $ cat ~/.gitconfig
    url "[email protected]:"]
    [url "[email protected]:"]
    insteadOf = https://github.com/
    $ go get github.com/private/repo && echo Success!
    Success!
  8. @shurcooL shurcooL revised this gist Oct 10, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -11,4 +11,4 @@ Sources:

    - https://help.github.com/articles/which-remote-url-should-i-use #You can also use SSH agent forwarding with your deploy script to avoid managing keys on the server.
    - http://golang.org/doc/faq #Why does "go get" use HTTPS when cloning a repository?
    - https://www.kernel.org/pub/software/scm/git/docs/git-config.html #url.<base>.insteadOf
    - https://www.kernel.org/pub/software/scm/git/docs/git-config.html #url.\<base\>.insteadOf
  9. @shurcooL shurcooL revised this gist Oct 10, 2013. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,6 @@ Success!

    Sources:

    https://help.github.com/articles/which-remote-url-should-i-use #You can also use SSH agent forwarding with your deploy script to avoid managing keys on the server.
    http://golang.org/doc/faq #Why does "go get" use HTTPS when cloning a repository?
    https://www.kernel.org/pub/software/scm/git/docs/git-config.html #url.<base>.insteadOf
    - https://help.github.com/articles/which-remote-url-should-i-use #You can also use SSH agent forwarding with your deploy script to avoid managing keys on the server.
    - http://golang.org/doc/faq #Why does "go get" use HTTPS when cloning a repository?
    - https://www.kernel.org/pub/software/scm/git/docs/git-config.html #url.<base>.insteadOf
  10. @shurcooL shurcooL created this gist Oct 10, 2013.
    14 changes: 14 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    ```bash
    $ ssh -A vm
    $ cat ~/.gitconfig
    url "[email protected]:"]
    insteadOf = https://github.com/
    $ go get github.com/private/repo && echo Success!
    Success!
    ```

    Sources:

    https://help.github.com/articles/which-remote-url-should-i-use #You can also use SSH agent forwarding with your deploy script to avoid managing keys on the server.
    http://golang.org/doc/faq #Why does "go get" use HTTPS when cloning a repository?
    https://www.kernel.org/pub/software/scm/git/docs/git-config.html #url.<base>.insteadOf