mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
Backport #30964 by @llxlr https://docs.npmjs.com/cli/v10/using-npm/scope#associating-a-scope-with-a-registry Co-authored-by: james yang <yanghongday369@gmail.com>
This commit is contained in:
parent
f806bbb815
commit
70eaa99ac0
@ -30,7 +30,7 @@ The following examples use the `npm` tool with the scope `@test`.
|
||||
To register the package registry you need to configure a new package source.
|
||||
|
||||
```shell
|
||||
npm config set {scope}:registry https://gitea.example.com/api/packages/{owner}/npm/
|
||||
npm config set {scope}:registry=https://gitea.example.com/api/packages/{owner}/npm/
|
||||
npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{token}"
|
||||
```
|
||||
|
||||
@ -43,7 +43,7 @@ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{t
|
||||
For example:
|
||||
|
||||
```shell
|
||||
npm config set @test:registry https://gitea.example.com/api/packages/testuser/npm/
|
||||
npm config set @test:registry=https://gitea.example.com/api/packages/testuser/npm/
|
||||
npm config set -- '//gitea.example.com/api/packages/testuser/npm/:_authToken' "personal_access_token"
|
||||
```
|
||||
|
||||
|
@ -30,7 +30,7 @@ menu:
|
||||
要注册软件包注册表,您需要配置一个新的软件包源。
|
||||
|
||||
```shell
|
||||
npm config set {scope}:registry https://gitea.example.com/api/packages/{owner}/npm/
|
||||
npm config set {scope}:registry=https://gitea.example.com/api/packages/{owner}/npm/
|
||||
npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{token}"
|
||||
```
|
||||
|
||||
@ -43,7 +43,7 @@ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{t
|
||||
例如:
|
||||
|
||||
```shell
|
||||
npm config set @test:registry https://gitea.example.com/api/packages/testuser/npm/
|
||||
npm config set @test:registry=https://gitea.example.com/api/packages/testuser/npm/
|
||||
npm config set -- '//gitea.example.com/api/packages/testuser/npm/:_authToken' "personal_access_token"
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user