mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #497] Github Enterprise #340
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#340
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 @MichaelSp on GitHub (Jan 21, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/497
Unfortunately GH Enterprise is not supported.
For actions to work on Enterprise you'll have to mirror the actions (ugly but 🤷). In our enterprise setup this means we'll have to define the official action
https://github.com/github/super-linter/as mirrored in
https://<gh-enterprise>/ghcom-actions/github-super-linterNow additionally we're required to authenticate even for
git clone.This is the current output with
-v:for the following
ci.ymlFor that to work we need:
github.comgit-cli.@catthehacker commented on GitHub (Feb 8, 2021):
Hi @MichaelSp 👋
Working on it.
Could you clarify which tool you think of?
I never used GitHub Enterprise Server but from the docs it looks like it should be able to handle authentication via PAT
@MichaelSp commented on GitHub (Feb 8, 2021):
There are two ways to do authentication against GH:
For most cases the
gitshell command should know which protocol and also which credentials to use (token/key/OS provided cred-helper/...). I think the easiest way would be to reuse these information. TBH: I'm not a go expert, but I'm sure there is some kind of "official"(tm) way to usegit cloneand reuse the existing client config.By the way: We have two enterprise instances. One with HTTPS/SSH and one with HTTPS-only.
@catthehacker commented on GitHub (Feb 8, 2021):
Oh, ok, you meant
git. I thoughtgit-cliis some fancy CLI tool for GitHub or something like that.https://github.com/catthehacker/act-fork/tree/enterprise-github
@github-actions[bot] commented on GitHub (Mar 11, 2021):
Issue is stale and will be closed in 14 days unless there is new activity
@catthehacker commented on GitHub (Mar 11, 2021):
Hi @cplee, could you add
stale-exemptlabel to this issue, please?@KnisterPeter commented on GitHub (May 5, 2021):
@cplee @catthehacker: We, @ZauberNerd and I are continue working on #658. Currently we want to test the PR against our GHE instance.
A question which is still a bit unclear: Do you have any perference on how the authentication token (probably PAT) should be made available to
act? A CLI flag sounds a bit dangerous to me if someone wants to run act e.g. in a CI environment.@KnisterPeter commented on GitHub (May 5, 2021):
It might be possible to use the
GITHUB_TOKENdefined by github actions as an implicit secret. We could leverage that if you don't mind.@MichaelSp commented on GitHub (May 5, 2021):
My local
gitclient is already fully configured for authenticated enterprise access. Why not re-use that?In case of SSH, we should use the SSH-Key and in case of PAT, we should either use the key-chain or what ever the OS provides. Or we can do something like:
What ever we do, if we rely on
gitas much as we can, it should pretty much work out of the box without additional configuration or dedicated env-vars (which is obviously preferred)@KnisterPeter commented on GitHub (May 5, 2021):
Hi @MichaelSp, that might work for you, but not for everyone.
There are environments where no system keychain is setup. Using the username/password in the URL could have security implications by leaking the token to output of the runner.
It might be possible to work around that but that would be more work.
@ZauberNerd commented on GitHub (May 5, 2021):
@MichaelSp that won't work, because
actdoes not use thegitbinary but insteadgo-gitwhich does not support global configuration (see: https://github.com/go-git/go-git/blob/master/COMPATIBILITY.md#supported-capabilities).You could potentially set the local git remote to include username/password or token, but that would then be visible in the log output of
act.We're now using the
http.basicAuthauthentication in our PR which uses the existingGITHUB_TOKEN, which should always be set foract, because some actions might depend on it.@MichaelSp commented on GitHub (May 5, 2021):
sad /me acknowledges 😭 Thanks for taking care of this topic everybody!
@catthehacker commented on GitHub (May 5, 2021):
Integrating with keychain is definitely something too check out sometime but
actworking with GHE, even with just PAT, should be a good baseline which I'm thankful ❤️ to @ZauberNerd and @KnisterPeter for creating the PR