Last active
June 26, 2022 00:34
-
-
Save fahmifan/9d224d88d65d946a8958c9851748fc25 to your computer and use it in GitHub Desktop.
Setup for Accessing Go Private Repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add your ssh public key to github & gitlab | |
# set GOPRIVATE, for github & gitlab | |
GOPRIVATE="gitlab.com/<your-private-group>,github.com/<your-private-group>" | |
# if you use a private hosted gitlab | |
GOPRIVATE="gitlab.yoursite.com" | |
# set github to use ssh | |
git config --global url."git@github.com:".insteadOf "https://github.com/" | |
# set gitlab to use ssh | |
git config --global url."git@gitlab.com:".insteadOf "https://gitlab.com/" | |
# if you use a private hosted gitlab | |
git config --global url."git@gitlab.yoursite.com:"insteadOf "https://gitlab.yoursite.com/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment