mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #2039] Incorrect GitHub SSH keys (or missing new ones) #976
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#976
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @andrewvaughan on GitHub (Oct 9, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/2039
Bug report info
Command used with act
Describe issue
Most of my problem information is at https://github.com/nektos/act/discussions/2035
But generally, I'm getting this error when running
actlocally:I used Docker to enter the machine and check the available keys:
When I entered, I noticed there was no user SSH key, so I checked the global one:
Sure enough, the known hosts are missing a number of GitHub's more secure SSH key fingerprints, as published here:
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints
It should look like this:
My system is configured to use ED25519, which is significantly more secure and becoming the standard encryption for keys moving forward for most systems. Not including the ED25519 key in the SSH keys for the container is going to cause more and more people to have issues.
I'm hoping this can be hotfixed, because I'm completely blocked until this can be fixed.
Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
No response
@andrewvaughan commented on GitHub (Oct 9, 2023):
This may be an issue with https://github.com/oxsecurity/megalinter - I've opened the issue above to help dive in. I'm leaving this open in case someone wants to confirm.
@andrewvaughan commented on GitHub (Oct 17, 2023):
So I've been running megalinter manually since opening this - no issues with them. That said, I can access GitHub via SSH
My best guess is this all lies in the fact that the Docker container purposely only pulls the
RSAfingerprints from GitHub, which is deprectated, per https://github.com/catthehacker/docker_images/issues/115@ChristopherHX commented on GitHub (Oct 22, 2023):
Since you are the first one reporting this kind of issue and didn't gain any thumbs up, we have a sightly different opinion how important your problem is. I will merge your PR now.
act allows to use custom images and extending it with cached known hosts is only a two line dockerfile, so I'm kinda surprised this would be a blocking issue for you.
@andrewvaughan commented on GitHub (Oct 23, 2023):
Thanks @ChristopherHX - honestly I'm not confident this is even my issue. I've just hit a wall with the tool as to how I can debug it further with the given images.
It's certainly a two-line Dockerfile... followed by a plethora of entrypoint logic, so unfortunately it's not that trivial.
@m477r1x commented on GitHub (Oct 30, 2023):
Thought i'd give the issue its first thumbs up since i just tried to use act for the first time and i have been banging my head against a wall with my action for an entire day, found this tool to try to alleviate some of the time consuming process of testing the action, only to be faced with something ELSE to fix first. I agree that this is trivial but when you have been working all day with a headache like me, something like this cropping up just when you think you've found a tool that might help you, sad times 😭
@andrewvaughan commented on GitHub (Oct 30, 2023):
Hah - I appreciate the affirmation. I mentioned in the original discussion, this is an issue that will become more prevelant as users start using the new standard GitHub switched to - thumbs up isn't always a great way to determine importance. It's not often people create new keys, but this is an issue that will certainly become more common as people rotate keys and new users come on board, and it completely blocks use of the tool. All it takes is one new member joining a team at a company and the tool is incompatible with GitHub for them.
Unfortunately for me, our Chief Architect raised their eyebrows at the response - we've had to strip
actfrom our entire pipeline, as it was placed on our OSS blacklist. There was quite some surprise at the response and a loss of confidence the utility would continuously be maintained in a way we tied our training/infrastructure standards to. Too much risk of having to rip it out later, apparently.@ChristopherHX commented on GitHub (Oct 30, 2023):
I have also a loss of confidence, because PR reviews take too long in nektos/act.
Still wondering why act was hyped, it was even worse in compatibility at the time I found it so I decided to build my own tool to use actions/runner locally instead of act.
The only reason I contributed to act is, it works flawless on non standard OS/arch. In that context is compatibility with GitHub Hosted Runners less important.
@ChristopherHX commented on GitHub (Oct 30, 2023):
BTW this was my own opinion
If you look at https://github.com/actions/runner/issues/2009 you can even loose confidence in GitHub Actions, not even a single response within a year. That's how it works in GitHub.
@VincentTanguayCasgrain commented on GitHub (Dec 19, 2023):
Using webfactory/ssh-agent solved the issue for me.
@MiltiadisKoutsokeras commented on GitHub (Feb 7, 2024):
With act version 0.2.57, the run stops and hangs in the step of validating GitHub SSH Host keys:
Getting a shell in the container that runs the Action, showcases that there is not known hosts setup for Github:
System
User
Also testing GitHub SSH connection also stops and asks for host key acceptance:
I use
webfactory/ssh-agent@v0.9.0and it does not solve the issue as @VincentTanguayCasgrain mentioned.What our Action does is that is adds SSH private keys of Github repos with
webfactory/ssh-agent@v0.9.0and then usepip installfor installing the private Github repo projects via a requirement of typegit+ssh://git@github.com/REPO.git@BRANCH#egg=REPO@MiltiadisKoutsokeras commented on GitHub (Feb 7, 2024):
I have updated Node.js to 20.x in our Github Action container and still the known hosts are not setup properly by
webfactory/ssh-agent. I have a workaround for people wishing to use Act for testing Github Actions, just add this step before any SSH related step:UPDATE: It does not work when run by Github instead of Act locally:
I am starting to get the feeling there are major issues in general between Act, Github runners and Actions integration. The inconsistencies are too many to ignore.
UPDATE #2: It works in Github runner if you add the host keys to system file instead of user known_hosts:
@github-actions[bot] commented on GitHub (Aug 6, 2024):
Issue is stale and will be closed in 14 days unless there is new activity