安装私有的 GitLab 包,使用特定版本。

huangapple go评论56阅读模式
英文:

Install private gitlab package with specific version

问题

我有一个私有的GitLab包。它的当前版本 == 0.2.15

我使用Poetry构建和发布包。我总是这样安装包:

pip install sdk --index-url https://__token__:<token>@gitlab.example.com/api/v4/projects/6/packages/pypi/simple

我需要安装特定版本的包(例如0.2.13)。我该如何做?我尝试过@0.2.13#0.2.13,但都不起作用。

英文:

I have private gitlab package. His current version == 0.2.15

I am build and publish package with poetry. Always I install package as

pip install sdk --index-url https://__token__:&lt;token&gt;@gitlab.example.com/api/v4/projects/6/packages/pypi/simple

I need to install specific version of package (0.2.13 f.e.). How can I do it? I tried with @0.2.13 and #0.2.13. It's not work.

答案1

得分: 1

The package version is specified with ==.

pip install sdk==0.2.13 \
    --index-url 'https://__token__:<token>@gitlab.example.com/api/v4/projects/6/packages/pypi/simple'
英文:

The package version is specified with ==.

pip install sdk==0.2.13 \
    --index-url &#39;https://__token__:&lt;token&gt;@gitlab.example.com/api/v4/projects/6/packages/pypi/simple&#39;

huangapple
  • 本文由 发表于 2023年5月26日 00:30:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/76334453.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定