0

I'm trying to use a private GitLab repository with Go Dep.

Is it possible to use a GitLab Deploy Key to clone the project with Dep?

Below is my sample Gopkg.toml & Deploy Token:

Gopkg.toml

[[constraint]]
  name = "gitlab.com/example/foo"
  branch = "master"

Deploy Token:

Username: gitlab+deploy-token-1234

Password: a1234567

patrick-fitzgerald
  • 2,561
  • 3
  • 35
  • 49
  • Yes, it's possible by configuring git (globally or for a single go project only) to fetch data from your custom server instead. I'm using it with gitea, and I haven't had any issues since. Unfortunately, it's not possible with dep only. – maja Oct 30 '18 at 17:31
  • Probably the same as using go tools with other private repos. Have you tried configuring git to use ssh instead of https? – JimB Oct 30 '18 at 17:44
  • My question about using `go dep` instead of `go get`. – patrick-fitzgerald Oct 30 '18 at 18:58
  • 1
    Both, `go get` and `dep` just invoke `git`. Duplicate. – Volker Oct 30 '18 at 19:13

0 Answers0