gopherdata / gopherdata/gophernotes

Cannot import package from a private repo inside a group

Offen
#209 10 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
4k
Forks
264
Ø Merge
7 T. 21 Std.
Gemergte PRs (30 T.)
1

Beschreibung

I am trying to import a module from a private repo.

`import "gitlab.private-repo.com/sre/scout/flowgraph-api.git"`

Notice that `plowgraph-api` lives inside `scout` group inside `sre` , which may complicate things.

Go get from command line outside jupyter works:
```
❯ go get -v gitlab.private-repo.com/sre/scout/flowgraph-api.git
get "gitlab.private-repo.com/sre/scout": found meta tag get.metaImport{Prefix:"gitlab.private-repo.com/sre/scout", VCS:"git", RepoRoot:"https://gitlab.private-repo.com/sre/scout.git"} at //gitlab.private-repo.com/sre/scout?go-get=1
go get: gitlab.private-repo.com/sre/scout/flowgraph-api.git@v1.3.2: parsing go.mod:
module declares its path as: gitlab.private-repo.com/sre/scout/flowgraph-api
but was required as: gitlab.private-repo.com/sre/scout/flowgraph-api.git

```

However importing in jupyter, I get the following error
`error loading package "gitlab.private-repo.com/sre/scout/flowgraph-api.git/api/client" metadata: packages.Load() could not find package "gitlab.private-repo.com/sre/scout/flowgraph-api.git/api/client"`

I tried multiple formatts for import statements

![image](https://user-images.githubusercontent.com/29500178/81177944-21a99780-8fb0-11ea-987d-4bd6a0a44c44.png)

```
❯ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/david/.cache/go-build"
GOENV="/home/david/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/david/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/home/david/go/go1.13.10/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/home/david/go/go1.13.10/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build040957544=/tmp/go-build -gno-record-gcc-switches"
```

Any help would be appreciated, thanks!

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.