Comments (8)
I copied the public key using xclip -sel clip < ~/.ssh/github_actions.pub and pasted the content in the deploy_key config of GitHub under the title GITHUB_ACTIONS_DEPLOY_KEYS
I've understood this as that you added the public part of the SSH key as a deployment key in the private repo – haven't you?
A deployment key tells GitHub that the owner of the private key part (your GHA workflow in this case) is entitled to clone the repository, also if it is private. You need to make sure that cloning happens with a SSH URL, which should look like [email protected]:webfactory/ssh-agent.git
.
from ssh-agent.
I had the deploy key set up on the repository where the GitHubActions were triggered, not the private dependency itself. Now GHA can finally clone/fetch the private dependency.
Many thanks!
from ssh-agent.
Could you do me a favor and re-read the README file? Is there anything missing or worded unprecisely that could have saved you the hassle?
from ssh-agent.
Strange – at first, this all looks right.
What seems strange to me is that the ssh-agent
tries to read from .ssh/id_rsa
, although we never put the key there. It's read from STDIN
.
In my test runs, the action output looks like this:
Run webfactory/[email protected]
with:
ssh-private-key: ***
Adding GitHub.com keys to /home/runner/.ssh/known_hosts
Starting ssh-agent
Adding private key to agent
Identity added: (stdin) ((stdin))
Keys added:
4096 SHA256:/XOu...long.id.here...R1kaI (stdin) (RSA)
Do you see this output as well before your dependency-fetching step starts?
from ssh-agent.
I have something almost similar:
Run webfactory/[email protected]
with:
ssh-private-key: ***
Adding GitHub.com keys to /home/runner/.ssh/known_hosts
Starting ssh-agent
Adding private key to agent
Identity added: (stdin) (ryan@name_of_my_computer)
Keys added:
256 SHA256:/XOu...long.id.here...R1kaI ryan@name_of_my_computer (ED25519)
Don't know if it matters, but as you can see, sometime stdin
is replaced by ryan@name_of_my_computer
and the line after keys added starts with 256
instead of 4096
. Aslo RSA
is replaced with ED25519
.
from ssh-agent.
No, that's not an issue. It's a comment field embedded in the SSH key, and it's the type and length of the key. That's all fine IMO.
Could you add run: git clone {ssh-url-for-your-private-repo}
right after the webfactory/ssh-agent
action step? That way, we could check if a simple, plain git clone
works for the repo and the key.
from ssh-agent.
I get that:
Cloning into 'my_private_dependency'...
Warning: Permanently added the RSA host key for IP address 'some_IP' to the list of known hosts.
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
##[error]Process completed with exit code 128.
So I cannot simply clone the repo. From what I understood, I shouldn't have to configure anything on the private repo side or?
from ssh-agent.
@mpdude I'm going through something identical here. Have set public key as Deploy Keys in the private repo. And, set private key as Secret in the repo running github actions. Only difference between the issue and my case, is that I'm trying to install the private git repo via pipenv
. Any idea what could be causing this error ?
FAIL
ERROR:pip.subprocessor:Command errored out with exit status 128:
command: git clone -q ssh://github.com/kai490952010/<repo>.git /tmp/pipenv-5x2u39s9-src/csci-utils
cwd: None
Complete output (6 lines):
Warning: Permanently added the RSA host key for IP address '140.82.114.3' to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
from ssh-agent.
Related Issues (20)
- Public Key Printed Out Even With log-public-key set to false HOT 4
- ERROR: stat "": no such file or directory
- Enable custom github server HOT 1
- Can't get it to work – Permission denied HOT 1
- Update to node20 HOT 2
- Windows workflow fails with "Could not read from remote repository" HOT 5
- `no such identity` on self-hosted Linux Github runner HOT 2
- After update to 0.9.0: The ssh-private-key argument is empty ... HOT 9
- Post cleanup fails HOT 2
- Error: Command failed: ssh-add - HOT 1
- Error: does not match GitHub URL pattern. Not treating it as a GitHub deploy key on version 0.9.0 HOT 6
- changelog out of date HOT 1
- Documentation about how to set up self-hosted runners HOT 4
- When upgrading from 0.7.0 to 0.8.0, functionality breaks HOT 2
- add ssh key for host?
- Is there a way to setup this without having a key specified?
- 'Support for GitHub deploy keys' breaks local CI for repositories which are submodules of other repositories which use ssh-agent with local CI
- The "file" argument must be of type string. Received undefined - in Post job HOT 1
- README needs to be updated (SSH keys should no longer be made in PEM format)
- Host key verification failed on Windows on 0.9.0 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ssh-agent.