Cannot find private repo while using personal access token
Hello, I'm trying to use this action with a personal access token because I have a flake input from a private repo that I fetch over HTTPS. Even though using the same token in a curl yields results and using it in my nix.conf fetches the flake fine as well, passing it to the action returns a 404. I don't understand what I'm doing wrong. It seems like the action does not use the token when fetching the flakes. Can someone help me with this please ?
You may be able to get this to work in the meantime by adding it to your nix.conf -- since you're using our nix-installer-action, that should be as simple as adding with: token: ${{ secrets.THE_TOKEN }} to your workflow (of course, in proper YAML).
Thanks for your suggestion, however I just solved it by adding the token as a nix option. A successful job run ! This might be a good addition to the README if it's the intended way to pass the access token to the nix command.
I think we (used to?) support a with: token: argument to this action, but that might have gotten forgotten / lost / broken when we transitioned this to a TypeScript-based action.
I actually use this option in my workflow. The action probably uses it only for the PR creation and does not pass it to the nix command ?
I actually use this option in my workflow. The action probably uses it only for the PR creation and does not pass it to the nix command ?
I'm actually experiencing the same issue; I tried copying your workflow but it still doesn't work... I don't know if there is any difference, but I am using git+ssh instead of git+https.
Are you using a PAT or a classic token?
In my case it's a fine-grained token. I precisely had the problem because I was trying to use HTTPS for fetching instead of SSH, so you might have a problem with SSH keys rather than tokens.
[...] so you might have a problem with SSH keys rather than tokens.
Thanks for the feedback. I think you're right; how did you get around this?
In your workflow, you'll need your job to have access to an SSH key which has the ability to clone your private repo. Something like this : https://github.com/webfactory/ssh-agent.
In your workflow, you'll need your job to have access to an SSH key which has the ability to clone your private repo. Something like this : https://github.com/webfactory/ssh-agent.
I managed to find out 😊 I (shamelessly) copied yours and actually added exactly that Action. Again, thanks 💯