ssh-agent
ssh-agent copied to clipboard
"Not treating it as a GitHub deploy key"
I am adding the below private key, which is stored in the repo's secrets. The corresponding public key is found as a deploy key in another repo within the same private Github organization. Below is the yaml where I am trying to install my private key.
- name: Install SSH Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.ACCESS_KEY }}
When this is run, I get this.
Key(s) added
Configuring deployment key(s)
...
Added deploy-key mapping: Use identity...
Comment for (public) key '' does not match GitHub URL pattern. Not treating it as a GitHub deploy key.
What doest that last line mean? Does this mean that something went wrong? It looks like it thinks the public key is empty based on the empty quotes?
@mpdude ?
The error message refers to https://github.com/webfactory/ssh-agent#support-for-github-deploy-keys
The error message refers to https://github.com/webfactory/ssh-agent#support-for-github-deploy-keys
@sebastiankugler , I've read that section two or three times and still don't understand what specifically is going wrong. The public part of the ssh key I created I put in the Deploy Keys section of the repo I am trying to clone. I used this command ssh-keygen -t ed25519 -C "[link to private repo I am trying to clone]"
And then I put the private key in the secrets of the repo that the workflow is in. What am I doing wrong?
This is a StackOverflow link that explains the entirety of the problem. Maybe it's helpful to you: https://stackoverflow.com/questions/73775185/not-treating-it-as-a-github-deploy-key
I'm having the same issue:
Comment for (public) key '' does not match GitHub URL pattern. Not treating it as a GitHub deploy key.
Where: Cloning into '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20220922-1213-1xo8s4a'... ERROR: Repository not found. fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
I'm having the same issue:
Comment for (public) key '' does not match GitHub URL pattern. Not treating it as a GitHub deploy key.
Where: Cloning into '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20220922-1213-1xo8s4a'... ERROR: Repository not found. fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
I also get the same issue. I use docker and forward the ssh with --ssh default
but it works on my local machine (using macOS)
@sebastiankugler, @mpdude, @MalteWunsch After discussing in this issue (https://github.com/actions/checkout/discussions/928#discussioncomment-3861581), I finally got it to work when I ran on ubuntu-latest instaed of windows-latest. This shows that there is an issue with this package on Windows. Can this be investigated, please?
@sfullerbeckman could you please check if #137 solves the issue for you?
@sfullerbeckman
#137 hopefully resolved an issue with Windows-based runners not finding the right git
binary.
#139 removed a meaningless/confusing/wrong log message
There is a remaining issue that when using actions/checkout
with submodules: true|recursive
, that action might revert the configuration set up by this one here. I have opened https://github.com/actions/checkout/issues/973 to coordinate. In the meantime, check if doing the submodule initialization manually at a later step and putting webfactory/ssh-agent
after actions/checkout
(#92) helps for the time being.
@mpdude , doing the submodule initialization manually at a later step and putting webfactory/ssh-agent after actions/checkout does work for the time being. Thank you.
Closing this issue since this https://github.com/webfactory/ssh-agent/issues/130#issuecomment-1284043999 provided an answer for what I need at the time being. Other problems are captured in other issues.