Dealing with Codeberg rate limits

Hi,

as some of you mat know codeberg.org is becoming more populare lately. So much that some people move there projects over to it. Since codeberg is not a commercial operation, they do limit unauthenticated traffic.

So now I have the problem that one of the packages I depend on is coming from codeberg (nvim-jdtls to be specific). Since codeberg rate limits unauthenticated access, it looks like nvim-jdtls hasnt’t made it into nixpkgs binary cache. When I build my config on CI, it fails for the same reason.

I’m now looking for a way to supply a codeberg token, so my build will make authenticated requests. Will adding a .netrc do the trick? How do others deal with the situation?

Cheers,
Benedikt

How are you currently wiring up your inputs? Have you tried using git+ssh with appropriate keys in the evaluators user config?

use access-tokens option? i haven’t use it for codeberg yet, but for github, which works fine. maybe you can have a try.

Afaik flakes/fetchTree don’t support a codeberg: schema, so I doubt that nix knows how to apply a configured access token

Assuming this is the repository on Codeberg:

That repository is mirrored on GitHub:

If nothing else works, you could override the source URL for the nvim-jdtls package to point to the GitHub repository instead of Codeberg

Just ran into the same issue for another package - nvim-lint.

There must be a better way to handle this, if someone can point me in the right direction I could try and implement this feature if it doesn’t exist already.

My original question so far remained unanswered…

Are you using git+https or git+ssh when this happens? Also, just in case, is sudo or another elevator involved?

As I understood it, this isn’t about flake inputs but fetchFromCodeberg, and that hydra was unable to build the package itself because of rate limiting.

Edit: actually it’s using fetchgit, fetching the tarball instead might be an improvement: nixpkgs/pkgs/applications/editors/vim/plugins/generated.nix at 8ce4ef6cb6f871616146b9fe26d2a5ae594e94fe · NixOS/nixpkgs · GitHub

Edit 2: the plugin isn’t in the binary cache because it’s incorrectly marked as unfree (and has hydraPlaforms set to an empty list, but that seems to be the case for most vim plugins?)