Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github: support private repository #337

Open
OlivierLDff opened this issue Apr 27, 2024 · 0 comments
Open

Github: support private repository #337

OlivierLDff opened this issue Apr 27, 2024 · 0 comments

Comments

@OlivierLDff
Copy link

Trying to use nurl on a private repository, I get an error:

HTTP error 404

       response body:

       {
         "message": "Not Found",
         "documentation_url": "https://docs.github.com/rest/commits/commits#get-a-commit"
       }
Error: command exited with exit status: 1

I see in the source code that no token are set.
Would it be possible to read optional token from env variable for example GITHUB_TOKEN. Or to be able to specify it via CLI, for example via --token?

For those interested, my current workaround it to use (this is based on some comments I found in a github issue, but I forgot to write down the author name, I adapted it to fix the deprecation warning):

nix-shell -p nix-prefetch-git jq --run "nix hash convert --hash-algo sha256 --to sri \$(nix-prefetch-git --url https://github.com/USER/REPO --quiet --rev TAG | jq -r '.sha256')"

Of course this just gives me the sha256, which is just what I need for now.

Have a nice day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant