Dep: Unable to `dep init` on GitLab project

Created on 28 May 2018  路  3Comments  路  Source: golang/dep

What version of dep are you using (dep version)?

v0.4.1

What dep command did you run?

dep init

What did you expect to see?

Init a new dep project

What did you see instead?

init failed: unable to solve the dependency graph: Solving failure: remote repository at https://gitlab.com/myproject/mysubproject.git does not exist, or is inaccessible: GitLab: The project you were looking for could not be found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
: exit status 128

Details

I am trying to run dep init on a GitLab private project.

There have a been a few issues opened with GitLab before (https://github.com/golang/dep/issues/1502) however I couldn't find anything that I am doing wrong as per those issues.

The URL of the repo would is something like https://gitlab.com/myproject/mysubproject/myrepo.git and when I go go get gitlab.com/myproject/mysubproject/myrepo.git it works (I am redirecting git to use ssh as well) however with dep I get the issue above.

Given that go get works I had an expectation that dep should probably work too. Is there any way around this issue? I am a little lost on how to proceed.

Most helpful comment

hi, any update on this issue?

All 3 comments

go get will try SSH whereas you specify HTTPS here. Dep doesn't know this might be a private repo so it attempts to get it without any auth and fails.

hi, any update on this issue?

Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!

Was this page helpful?
0 / 5 - 0 ratings