NPM ssh dependancy
Hi
I'm running into an issue where I'm using a private github npm dependancy and the build step is giving me back an "Unauthorized".
I can't use private tokens and so the only way I can see is by doing it through github ssh. Is there anyway to authorize a container with github ssh?
I've tried through the railway cli but it didn't seem to work.
Any help would be appreciated!
15 Replies
Project ID:
6cd21bc3-1e57-4c31-b7d1-7eec426fca78
6cd21bc3-1e57-4c31-b7d1-7eec426fca78
theres no official way to ssh into a container, and especially no way to do it during build, but lets see if we can find a way around this, how would you normally authorize npm to install this private dependency
In local development I've just been using git ssh authentication. The private repository is in my github that is linked to railway but npm can't access it. I've looked at just linking the private npm package inside the main repo with npm link but from what i've seen that's very messy
Sorry, should change the description to note not a direct SSH connection but adding ssh authentication for git. This is what i've been doing: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
what is the easiest way to do this though? can you provide the username and password to your github as command flags? can you provide the username and password in the url to the private dependency? what are all the options?
Usually the process requires me to generate a key on the terminal using ssh-keygen -t ed25519 -C "[email protected]"
what are all the options
What do you mean all the options? Inside Github? I can add the ssh key generated inside there. That's all.
all the possible options for authorizing npm to install a private dependency
so far ive only seen one
Currently no support for private npm 📦
vin is the ssh key the only way?
As far as I’m aware, yeah. Angelo has said a few times that there is no way to do it yet™️
i see
Thanks guys, hopefully in the future then. So I'll just have to bundle it in the actual repo