Skip to content

Commit

Permalink
Merge pull request #11 from mineiros-io/ch4036-add-private-pkg-readme
Browse files Browse the repository at this point in the history
docs: add go/git configuration for pvt repos to README.md
  • Loading branch information
Nathan Thiesen authored Nov 12, 2021
2 parents 087a899 + 9183f17 commit c0eab3d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,23 @@ go install github.com/mineiros-io/terradoc/cmd/terradoc@latest
We put great effort into keeping the main branch stable, so it should be safe
to use **latest** to play around, but not recommended for long term automation
since you won't get the same build result each time you run the install command.

### Go/Git configuration for private repositories

While this repository is private, there is some extra work in order to
download and install it using **go install**. There is two main steps.
First you need to configure git to use ssh instead of https:

```
git config --global [email protected]:.insteadOf https://github.com/
```

This only needs to be done once and will change the **.gitconfig** on your
host. Then you should always export **GOPRIVATE** for our mineiros-io repos
before running go install:

```
export GOPRIVATE=github.com/mineiros-io
```

More info [here](https://golang.org/ref/mod#private-module-proxy-direct).

0 comments on commit c0eab3d

Please sign in to comment.