Skip to content

Multiple SSH keys not working on GitHub Enterprise #117

Closed
@lcmgh

Description

@lcmgh

Hi!

I followed the docs to setup multiple ssh keys by generating them with comment parameter -C and adding the git URL from my GitHub Enterprise repo.

https://private-github.myenterprise/org/repo.git

I ensured correct keys were set as secret and deploy key but it seems correct keys are not mapped.

    - uses: webfactory/ssh-agent@v0.5.4
      with:
          ssh-private-key:  |
            ${{ secrets.DEPENDENCY_ACCESS_2 }}
            ${{ secrets.DEPENDENCY_ACCESS_2 }}

ERROR: Permission to abc denied to deploy key
fatal: Could not read from remote repository.

Might it be because only github.com URLs are supported?

child_process.execSync(`git config --global --replace-all url."git@key-${sha256}.github.com:${ownerAndRepo}".insteadOf "https://github.com/${ownerAndRepo}"`);

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions