mirror of
https://github.com/goharbor/harbor
synced 2025-04-20 20:23:38 +00:00
Formatting
This commit is contained in:
parent
7b176d6ae8
commit
68f3dc824c
|
@ -8,21 +8,24 @@ From release 1.8.0 onwards, user settings are configured separately from the sys
|
|||
|
||||
## Example Configuration Commands:
|
||||
|
||||
Add a new user in the local database:
|
||||
**Add a new user in the local database:**
|
||||
|
||||
`curl -X PUT -u "<username>:<password>" -H "Content-Type: application/json" -ki <Harbor Server URL>/api/configurations -d'{"<item_name>":"<item_value>"}'`
|
||||
|
||||
Get the current configuration, run the following command:
|
||||
**Get the current configuration:**
|
||||
|
||||
`curl -u "<username>:<password>" -H "Content-Type: application/json" -ki <Harbor Server URL>/api/configurations`
|
||||
|
||||
Update Harbor to use LDAP authentication:
|
||||
**Update Harbor to use LDAP authentication:**
|
||||
|
||||
Command
|
||||
|
||||
```shell
|
||||
curl -X PUT -u "<username>:<password>" -H "Content-Type: application/json" -ki https://harbor.sample.domain/api/configurations -d'{"auth_mode":"ldap_auth"}'
|
||||
```
|
||||
|
||||
Output
|
||||
|
||||
```
|
||||
HTTP/1.1 200 OK
|
||||
Server: nginx
|
||||
|
@ -33,14 +36,16 @@ Update Harbor to use LDAP authentication:
|
|||
Set-Cookie: sid=a5803a1265e2b095cf65ce1d8bbd79b1; Path=/; HttpOnly
|
||||
```
|
||||
|
||||
Restrict project creation to Harbor administrators:
|
||||
**Restrict project creation to Harbor administrators:**
|
||||
|
||||
Command
|
||||
|
||||
```shell
|
||||
curl -X PUT -u "<username>:<password>" -H "Content-Type: application/json" -ki https://harbor.sample.domain/api/configurations -d'{"project_creation_restriction":"adminonly"}'
|
||||
```
|
||||
|
||||
Output
|
||||
|
||||
```
|
||||
HTTP/1.1 200 OK
|
||||
Server: nginx
|
||||
|
@ -51,14 +56,16 @@ Restrict project creation to Harbor administrators:
|
|||
Set-Cookie: sid=b7925eaf7af53bdefb13bdcae201a14a; Path=/; HttpOnly
|
||||
```
|
||||
|
||||
Update the token expiration time:
|
||||
**Update the token expiration time:**
|
||||
|
||||
Command
|
||||
|
||||
```shell
|
||||
curl -X PUT -u "<username>:<password>" -H "Content-Type: application/json" -ki https://harbor.sample.domain/api/configurations -d'{"token_expiration":"300"}'
|
||||
```
|
||||
|
||||
Output
|
||||
|
||||
```
|
||||
HTTP/1.1 200 OK
|
||||
Server: nginx
|
||||
|
|
Loading…
Reference in New Issue
Block a user