gopherdata / gopherdata/gophernotes

Cannot import package from a private repo inside a group

Ouverte
#209 10 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Go
Étoiles
4k
Forks
264
Merge moyen
7 j 21 h
PR mergées (30 j)
1

Description

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!

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.