diff options
| author | Olivier LDff <olivier.ldff@gmail.com> | 2025-03-08 11:01:54 +0100 |
|---|---|---|
| committer | Olivier LDff <olivier.ldff@gmail.com> | 2025-03-12 11:07:12 +0100 |
| commit | f19cf904b182573a060aae063c9b0af88a198efe (patch) | |
| tree | 114ddaf27f8c837650e72d0d4a3e491e4d1d1d0c /pkgs/development/python-modules/rangehttpserver | |
| parent | f2b63c2c6e49c3a57c791a379010439cc0760dd6 (diff) | |
fetchFromGitHub: use of the API endpoint only when fetching tarball
https://github.com/NixOS/nixpkgs/pull/321484 introduced a bug when when
`forceFetchGit=true`.
This PR revert the change only for this case.
The previous PR made work cases like:
```bash
nix-build -E 'let pkgs = import ./nixpkgs {}; in pkgs.fetchFromGitHub {
owner = "<username>"; repo = "<repo>"; rev = "HEAD"; hash = "";
private=true; forceFetchGit=false; }'
```
You should see the download working and nix complaining about hash
mismatch.
Now if you take the case where `forceFetchGit=true`, this is a different
story:
```
nix-build -E 'let pkgs = import ./nixpkgs {}; in pkgs.fetchFromGitHub {
owner = "<username>"; repo = "<repo>"; rev = "HEAD"; hash = "";
private=true; forceFetchGit=true; }'
```
Logs look like:
```
Initialized empty Git repository in /nix/store/<hash>-source/.git/
fatal: could not read Username for 'https://github.com': No such device or address
fatal: could not read Username for 'https://github.com': No such device or address
fatal: could not read Username for 'https://github.com': No such device or address
fatal: could not read Username for 'https://github.com': No such device or address
Unable to checkout HEAD from https://github.com/<username>/<repo>.git.
```
I was using `forceFetchGit` for the exact reason the previous PR was
made, I will move to `forceFetchGit=false` now.
Still the previous PR was a broke usage of `fetchFromGitHub` force private repository when `forceFetchGit` is used.
Diffstat (limited to 'pkgs/development/python-modules/rangehttpserver')
0 files changed, 0 insertions, 0 deletions
