1

To cashing dependencies I use (as ) which connect to goproxy servers (because nexus can't get dependencies directly from GitHub) outside of private network.


nexus.some.repo.com:4443/repository/go-nexus-proxy ➡️ gonexus.dev nexus.some.repo.com:4443/repository/go-proxy ➡️ proxy.golang.org ...


GOPROXY="nexus.some.repo.com:4443/repository/go-proxy,nexus.some.repo.com:4443/repository/go-nexus-proxy"

enter image description here

and I use .netrc file to connect to

machine nexus.some.repo.com:4443 
login SOME_LOGIN 
password SOME_PASS 
protocol https

Could I use git credential.helper instead of .netrc

If yes How can I config git credential.helper

kozmo
  • 4,024
  • 3
  • 30
  • 48

1 Answers1

2

If you are already using netrc, you could simply configure the credential helper to use netrc

You can download and put in your PATH git-credential-netrc.perl

And then:

git config --global credential.helper netrc
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Could I use `osxkeychain` (Mac) or `store` with `go get`? – kozmo Oct 29 '20 at 07:44
  • 1
    @kozmo Yes, as illustrated by https://gist.github.com/katylava/47affb3a9248cbfbf179bec6a1079cd7 – VonC Oct 29 '20 at 07:45
  • @kozmo Do you mean using `git config --global credential.helper osxkeychain` and a go get was not enough? Don't forget it will work with your token (https://github.com/settings/tokens) and password, not your username and password. – VonC Oct 30 '20 at 11:09