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

Multiple keys not working #178

Open
florin-lazau opened this issue Apr 21, 2023 · 2 comments
Open

Multiple keys not working #178

florin-lazau opened this issue Apr 21, 2023 · 2 comments

Comments

@florin-lazau
Copy link

I have a React project that has two private repositories as dependencies. I created two SSH keys, added private keys as secrets and added public keys as deploy keys in the dependency repository.

This is the code from the pipeline

      - name: SSH
        uses: webfactory/[email protected]
        with:
          ssh-private-key: |
            ${{ secrets.SSH_PRIVATE_KEY1 }}
            ${{ secrets.SSH_PRIVATE_KEY2 }}

For some reason, the connection works only for the first key. I have tried putting SSH_PRIVATE_KEY2 first, and it worked for the repository that has SSH_PRIVATE_KEY2 public key counterpart, then I put SSH_PRIVATE_KEY1 first, and it worked for the repository that has SSH_PRIVATE_KEY1 public key counterpart.

Is someone else having the same issue?

@tompiler
Copy link

tompiler commented May 6, 2023

Yep, also having no luck. Even after following steps here to align git config and ssh config. I can clearly see by executing:

RUN --mount=type=ssh GIT_SSH_COMMAND="ssh -v" pip install git+ssh://[email protected]/owner/repo-b

that it is still trying to use the public deploy key from repo-a to authenticate to github for repository b. Really frustrating - been stuck on this for literally days and I think I'm as far as I can go.

@PeteDevoy
Copy link

PeteDevoy commented May 24, 2023

I seem to be experiencing the same problem. I think it may be related to new GH keys as discussed in v0.8.0

Single keys work, multiple not. I'm considering to try @shaunco 's fork

The PR of which was rejected: #38

More detail on his solution:
#30

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

3 participants