Closed mattpardee closed 10 years ago
How are you running Strider? Have you just cloned the git repository onto machine or are you running it through Docker?
You will need to ensure that whatever user is running the Strider process has an SSH key assigned to them and that SSH key has access to your private git repositories.
I installed via npm, not through docker. Running the npm install process in my own terminal works. I'm running strider in the same user space.
Also it's worth noting these npm refs are in this form: "reponame": "git+ssh://git@github.com:repoowner/reponame.git#commithash"
On the project you are having issues with, drag in the "Custom Scripts" module.
In the prepare phrase enter "whoami" and try running a build.
You should see the output in the terminal. Can you confirm that the user that is displayed by the "whoami" command is the user you expect?
Also, the user that is running Strider, does it have a private key in its user HOME dir?
Yep, same user. My ~/.ssh
dir has the keys I use for interacting with github. Is it possible the npm install
command being kicked off by strider isn't inheriting the same environment I'm using as the user I'm logged in as?
I'm guessing this is related. https://github.com/Strider-CD/strider/issues/381
Hi Matt,
What happens if you run env
as a custom script? Possibly $HOME isn't set?
Good guess, but the script reports that HOME is set to /Users/msp. It's interesting to me that strider can clone the original repo, which is private, but not the ones in NPM referenced by git+ssh. Is strider using its own version of NPM?
When I go into the temporary directory in /Users/msp/.strider/data
strider has created to house the cloned repo, and run npm install
myself, it works fine. Running ls -al
shows I am the owner of all the files contained therein.
How does env
in custom scripts differ from env
in a regular shell? If nothing is sensitive in it, please post it here.
Huge thanks to @Niallo for helping debug this and publishing the fix in the runner core, our private repos can be pulled in now.
When running, I get this error when trying to install private repos:
I've seen this previously, it's not using my system's default SSH key. Any ideas?