Skip to content

Instantly share code, notes, and snippets.

@aliykhoshimov
aliykhoshimov / gist:a65b110acb58f21bcc829a8f9a445094
Created March 17, 2025 15:29 — forked from technoweenie/gist:1072829
.netrc file so you can push/pull to https git repos without entering your creds all the time
machine github.com
login technoweenie
password SECRET
machine api.github.com
login technoweenie
password SECRET
@aliykhoshimov
aliykhoshimov / different-ssh-deploy-keys-multiple-private-repos-github-go-mod.md How to use different ssh deploy keys for multiple private github repositories with Golang Modules (go mod)

How to use different ssh deploy keys for multiple private github repositories with Go Modules

Let's assume you are using Go Modules and have a go.mod file that contains multiple private repos each with a different ssh key. How can you get go mod download to do the right thing -- i.e. use ssh key A with private repo A and ssh key B with private repo B?

Ok, here we go!

Let's assume you have some github.com user with multiple private repos:

https://github.com/someuser/private-repo-1