mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #554] Issue: .ssh directory not parity with Github Actions #375
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#375
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 @justindoody on GitHub (Mar 6, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/554
Act version
Expected behaviour
Typically and on github actions ssh will read files such as config, known_hosts, etc from
~/.ssh/directory.Actual behaviour
When using act these files are only read from
/root/.ssh. This likely has something to do withactmodifying the$HOMEdirectory in some order or timing differently than github actions. SSH does not necessarily read the current$HOME/.sshif home has been modified. See https://serverfault.com/a/951783 for additional context.Steps to reproduce
Expected to work and works on github actions but fails on act with host verification failed because ssh is not picking up the
known_hostsfile:Works on
actbut fails on github actions:This breaks most usage of ssh on
actand in such a way that is quite painful and not obvious to debug as the overwhelming online references around ssh assume~/.ssh/is going to get picked up.@catthehacker commented on GitHub (Mar 6, 2021):
Correct,
HOMEis modified here:github.com/nektos/act@8de7b956b7/pkg/runner/run_context.go (L578)@catthehacker commented on GitHub (Mar 7, 2021):
@justindoody could you check if the issue is still present using
-P ubuntu-latest=catthehacker/ubuntu:act-dev?@irealva commented on GitHub (Apr 1, 2021):
I'm having this problem too. Would be great to hear about a solution.
@catthehacker commented on GitHub (Apr 1, 2021):
Hi @irealva, proper solution will be removing below line and implementing #398
github.com/nektos/act@8de7b956b7/pkg/runner/run_context.go (L578)But workaround have been added in
catthehacker/ubuntu:act-devimage.@irealva commented on GitHub (Apr 1, 2021):
So you mean I should be able to run
act -P ubuntu-18.04=catthehacker/ubuntu:act-devwithout the "SSH Agent" and "Setup SSH Known Hosts" steps? That doesn't seem to work for me either.Thanks again!
@catthehacker commented on GitHub (Apr 1, 2021):
@irealva ssh agent and known hosts are required since it's not viable to included known hosts in docker image because it would get outdated.
@irealva commented on GitHub (Apr 1, 2021):
Got it, I misunderstood you. For others then I also solved the original poster's question with the
actstandard image by usingcontinue-on-error: