Skip to content

Commit dd2ceee

Browse files
committed
Add docs for git authentication
1 parent f441f8f commit dd2ceee

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,30 @@ Since uv has no dependency on Python, it can even install into virtual environme
172172
its own. For example, setting `VIRTUAL_ENV=/path/to/venv` will cause uv to install into
173173
`/path/to/venv`, no matter where uv is installed.
174174

175+
### Git authentication
176+
177+
uv allows packages to be installed from Git and supports the following schemes for authenticating with private
178+
repositories.
179+
180+
Using SSH:
181+
182+
- `git+ssh://git@<host>/...`
183+
184+
uv supports hosts with additional identifiers e.g. `g.yxqyang.asia-repo-1`.
185+
See the [GitHub SSH documentation](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh) for more details on how to configure SSH.
186+
187+
Using a password, PAT, or OAuth token:
188+
189+
- `git+https://<user>:<token>/...`
190+
- `git+https://<token>/...`
191+
- `git+https://<user>/...`
192+
193+
When using a GitHub personal access token, the username is arbitrary. GitHub does not support logging in with password directly, although other Git hosts may.
194+
195+
If a username is provided without a token, you will be prompted to enter a password.
196+
197+
If there are no credentials present in the URL and authentication is needed, the [Git credential helper](https://git-scm.com/doc/credential-helpers) will be queried.
198+
175199
### Dependency caching
176200

177201
uv uses aggressive caching to avoid re-downloading (and re-building dependencies) that have

0 commit comments

Comments
 (0)