You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Open your browser to the provider's device authorization page
79
89
3. Wait for you to authorize the application
80
90
4. Save the token to `~/.config/nix/nix.conf`
81
91
92
+
**Note for self-hosted instances**:
93
+
-**GitHub Enterprise**: You'll need to create an OAuth App and provide the client ID via `--client-id`
94
+
-**GitLab self-hosted**: You'll need to create an OAuth application and provide the client ID via `--client-id`
95
+
96
+
The tool will guide you through this process if the client ID is not provided. You can also set the `GITHUB_CLIENT_ID` or `GITLAB_CLIENT_ID` environment variables as an alternative to the `--client-id` flag.
97
+
82
98
### Check Status
83
99
84
100
View all configured tokens:
@@ -95,19 +111,25 @@ Remove a token interactively:
95
111
nix-auth logout
96
112
```
97
113
98
-
Or remove a specific provider's token:
114
+
Remove a specific provider's token:
99
115
100
116
```bash
101
117
nix-auth logout github
102
118
```
103
119
120
+
Remove a token for a specific host:
121
+
122
+
```bash
123
+
nix-auth logout --host github.company.com
124
+
```
125
+
104
126
## How It Works
105
127
106
128
The tool manages the `access-tokens` configuration in your `~/.config/nix/nix.conf` file. This allows Nix to authenticate when fetching flake inputs from private repositories or builtins fetchers, and hitting rate limits.
0 commit comments