-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Unable to npm install private repo via ssh using with ssh-key
#195
Comments
@RobinBol when ssh-key is provided, it is configured in the local git config using |
Was there a solution to this? I am having a similar issue. |
@alexrindone as stated in the issue description, I worked around this by: - uses: webfactory/ssh-agent@v0.2.0
with:
ssh-private-key: ${{ secrets.SSH_KEY }} But, I did not manage to get it working without |
I had the same problem on a different context. My project contains bash scripts that manage git submodules in a project. One of the tests checks for compatibility with SSH and that test would not pass when using The specific line of code run during the tests can be found here and the Actions workflow can be found here. |
I agree in that I would expect this to work, especially based on this from the README:
So I'm not sure if I'm setting up the secret wrong or this really doesn't work with regards to npm package installs. I'm using the private key for our service user (as recommended in the docs). Is that correct? |
It looks like the workaround to this, using webfactory/ssh-agent no longer works. I'm getting this error:
So it looks like Github has disabled some key capability that may prevent this action from working altogether? Removing it I find myself right back to the original problem, getting the error:
when trying to use actions/checkout@v2 with
|
FYI to those relying on the workaround of using |
I am trying to setup an action which checks out a git repo which has private npm dependencies (e.g.
"my-package": "git+ssh://git@github.com/myOrg/myPrivateRepo.git"
.Previously I would use:
Running
npm ci
afterwards results in a successful installation ofmy-package
.Now I saw
checkout@v2
has its ownssh-key
property, so I'd like to use that instead of thewebfactory/ssh-agent@v0.2.0
action.However the following configuration results in a
git@github.com: Permission denied (publickey).
:Full error log
I would expect that the
ssh-key
option would setup the ssh key in the local git config similar towebfactory/ssh-agent@v0.2.0
but that does not seems to be the case. Anyone an idea what is happening here?Thanks!
The text was updated successfully, but these errors were encountered: