E.g. trying to fetch https://tangled.sh/@tangled.sh/core/commit/19ee94f42ab259c218762e6f0ed87952f80b5162
ryan@gecko:~/scratch/tangled %
git init
Initialized empty Git repository in /home/ryan/scratch/tangled/.git/
ryan@gecko:~/scratch/tangled %
git remote add origin https://tangled.sh/@tangled.sh/core/
ryan@gecko:~/scratch/tangled %
git fetch origin 19ee94f42ab259c218762e6f0ed87952f80b5162
error: Server does not allow request for unadvertised object 19ee94f42ab259c218762e6f0ed87952f80b5162
but,
ryan@gecko:~/scratch/tangled %
git fetch origin master
remote: Enumerating objects: 4584, done.
remote: Counting objects: 100% (4584/4584), done.
remote: Compressing objects: 100% (1440/1440), done.
remote: Total 4584 (delta 3323), reused 4096 (delta 2969), pack-reused 0
Receiving objects: 100% (4584/4584), 665.40 KiB | 4.06 MiB/s, done.
Resolving deltas: 100% (3323/3323), done.
From https://tangled.sh/@tangled.sh/core
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
ryan@gecko:~/scratch/tangled %
git checkout 19ee94f42ab259c218762e6f0ed87952f80b5162
Note: switching to '19ee94f42ab259c218762e6f0ed87952f80b5162'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 19ee94f add forks to profile timeline
This is an issue using the Nix flake:
...
error: Server does not allow request for unadvertised object 19ee94f42ab259c218762e6f0ed87952f80b5162
error:
โฆ while checking flake output 'nixosConfigurations'
...
error: Cannot find Git revision '19ee94f42ab259c218762e6f0ed87952f80b5162' in ref 'refs/heads/master' of repository 'https://tangled.sh/@tangled.sh/core'! Please make sure that the rev exists on the ref you've specified or add allRefs = true; to fetchGit.
Ah yeah, so we can enable
git config --system uploadpack.allowReachableSHA1InWantand that should do the trick. If you're on your own knot server, you should be able to run this manually.