> ## Documentation Index
> Fetch the complete documentation index at: https://jncpkg.org/llms.txt
> Use this file to discover all available pages before exploring further.

# jnc auth

> Manage authentication for conda channels.

# jnc auth

Manages authentication credentials for private conda channels. Credentials are stored in the system's authentication storage and are used automatically when accessing authenticated channels.

## Subcommands

### `jnc auth login`

Stores authentication credentials for a host.

```bash theme={null}
jnc auth login [OPTIONS] <HOST>
```

#### Arguments

| Argument | Description                                                   |
| -------- | ------------------------------------------------------------- |
| `<HOST>` | The hostname to authenticate with (e.g., `repo.example.com`). |

#### Options

| Option                  | Description                                                               |
| ----------------------- | ------------------------------------------------------------------------- |
| `--token <TOKEN>`       | Use a token for authentication (e.g., a Quetz API key).                   |
| `--username <USER>`     | Username for basic HTTP authentication.                                   |
| `--password <PASS>`     | Password for basic HTTP authentication.                                   |
| `--conda-token <TOKEN>` | Use a conda token for authentication (token is included in the URL path). |

### `jnc auth logout`

Removes stored credentials for a host.

```bash theme={null}
jnc auth logout <HOST>
```

#### Arguments

| Argument | Description                             |
| -------- | --------------------------------------- |
| `<HOST>` | The hostname to remove credentials for. |

## Examples

Authenticate with a token:

```bash theme={null}
jnc auth login repo.example.com --token my-secret-token
```

Authenticate with username and password:

```bash theme={null}
jnc auth login repo.example.com --username user --password pass
```

Authenticate with a conda token:

```bash theme={null}
jnc auth login repo.example.com --conda-token t-abc123
```

Remove stored credentials:

```bash theme={null}
jnc auth logout repo.example.com
```
