1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00
james yang 2024-05-13 22:05:56 +08:00 committed by GitHub
parent b3beaed147
commit 8218b6484c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -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. To register the package registry you need to configure a new package source.
```shell ```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}" 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: For example:
```shell ```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" npm config set -- '//gitea.example.com/api/packages/testuser/npm/:_authToken' "personal_access_token"
``` ```

View File

@ -30,7 +30,7 @@ menu:
要注册软件包注册表,您需要配置一个新的软件包源。 要注册软件包注册表,您需要配置一个新的软件包源。
```shell ```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}" 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 ```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" npm config set -- '//gitea.example.com/api/packages/testuser/npm/:_authToken' "personal_access_token"
``` ```