Skip to content

Instantly share code, notes, and snippets.

@kiennt2
Created August 7, 2025 04:31
Show Gist options
  • Select an option

  • Save kiennt2/64cfabd7e179f37e70151fd024d2b3ea to your computer and use it in GitHub Desktop.

Select an option

Save kiennt2/64cfabd7e179f37e70151fd024d2b3ea to your computer and use it in GitHub Desktop.
Golang private repos config
subl .gitconfig
```
[user]
name = ABC
email = [email protected]
[core]
filemode = false
compression = 9
[push]
default = current
[pull]
default = current
# VIA SSH
[url "git@GIT_DOMAIN:"]
insteadOf = https://GIT_DOMAIN/
# VIA HTTPS
[url "https://USERNAME:PAT@GIT_DOMAIN/"]
insteadOf = git@GIT_DOMAIN:
[url "https://USERNAME:PAT@GIT_DOMAIN/"]
insteadOf = https://GIT_DOMAIN/
```
subl .netrc
```
machine GIT_DOMAIN login USERNAME password PAT
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment