Skip to content

Conversation

@hk21702
Copy link
Collaborator

@hk21702 hk21702 commented Nov 20, 2025

This PR adds support for checkout out a private repository into WSL by utilizing a GitHub token.

Note that the token persists in the git config even after the action completes. Since we aren't using a JavaScript action, we don't have the ability to cleanup the token in the git configuration at the end. Additionally, clearing the git configuration at the end of the main action would cause a change in behavior down the road between private and public repositories at best, and a breaking behavior change at worst. Thus, we only just warn the user in the description, and by default not use any token at all.

As a consequence, one should only be using this feature in tightly controlled environments such as self-hosted runners and should also use scoped permissions. Presently, the existing e2e tests only handle the non-token case for this reason.

Realistically, we should probably overhaul many of these actions to be more robust at some point.

@hk21702 hk21702 self-assigned this Nov 20, 2025
@hk21702 hk21702 marked this pull request as ready for review November 20, 2025 15:56
@hk21702 hk21702 requested a review from a team as a code owner November 20, 2025 15:56
@hk21702
Copy link
Collaborator Author

hk21702 commented Nov 20, 2025

Build failure is due to a mismatch in the Windows SDK version available on the latest GitHub Windows runners.

@hk21702
Copy link
Collaborator Author

hk21702 commented Nov 20, 2025

Once merged, we'll need to update this documentation page as well: https://documentation.ubuntu.com/wsl/stable/reference/actions/

@edibotopic
Copy link
Collaborator

Thanks @hk21702 --- it's also a good opportunity to revisit that documentation in general.

Copy link
Collaborator

@CarlosNihelton CarlosNihelton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! We can ignore the appx build errors for now, as they have nothing to do with this PR.

@hk21702 hk21702 merged commit 5ed18e8 into main Nov 21, 2025
8 of 11 checks passed
@hk21702 hk21702 deleted the wsl-checkout-private branch November 21, 2025 14:59
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.

4 participants