Skip to content

action.yml: Configure git to use HTTPS for GitHub repos#388

Open
thomasheritage wants to merge 1 commit intomainfrom
thomash_replace_all_patch
Open

action.yml: Configure git to use HTTPS for GitHub repos#388
thomasheritage wants to merge 1 commit intomainfrom
thomash_replace_all_patch

Conversation

@thomasheritage
Copy link
Collaborator

build.mjs runs a number of git commands including cloning repos (and their submodules). Any operation using SSH fails because SSH is not configured on the runner. For example, submodules might be configured using SSH (with "git@github.com" in ".gitmodules").

This commit configures git so that all uses of SSH for GitHub repos are automatically replaced with HTTPS. This is comparable to the behaviour of https://github.com/actions/checkout which notes "When the ssh-key input is not provided, SSH URLs beginning with git@github.com: are converted to HTTPS"

This is added to action.yml rather than to build.mjs because it aims to configure the runner environment -- if build.mjs is run in other contexts (e.g. local machine) then a different configuration might be needed.

build.mjs runs a number of git commands including cloning repos (and
their submodules). Any operation using SSH fails because SSH is
not configured on the runner. For example, submodules might be
configured using SSH (with "git@github.com" in ".gitmodules").

This commit configures git so that all uses of SSH for GitHub repos are
automatically replaced with HTTPS. This is comparable to the behaviour
of https://github.com/actions/checkout which notes "When the `ssh-key`
input is not provided, SSH URLs beginning with `git@github.com:` are
converted to HTTPS"

This is added to action.yml rather than to build.mjs because it aims to
configure the runner environment -- if build.mjs is run in other contexts
(e.g. local machine) then a different configuration might be needed.
@github-actions
Copy link

@thomasheritage
Copy link
Collaborator Author

Note that this will fix problems I'm actively having with redlines on ST 2067-206 as part of comment resolution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant