Skip to content

Strip remote creds instead of excluding .git - #4500

Merged
kubernetes-prow[bot] merged 1 commit into
kubernetes:masterfrom
puerco:creds-refix
Aug 26, 2026
Merged

Strip remote creds instead of excluding .git#4500
kubernetes-prow[bot] merged 1 commit into
kubernetes:masterfrom
puerco:creds-refix

Conversation

@puerco

@puerco puerco commented Aug 24, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

In #4424 we removed the .git directory from the source tarball that stage hands to release. Unfortunately this breaks the release process as krel release dies when attempting to open the repository.

This PR replaces que .git exclusion with logic to keep the git directory but now we strip all the remote credentials before tarring the kubernetes source.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

/cc @saschagrunert

I've run a full stage+release on a branch containing this patch here:
https://console.cloud.google.com/cloud-build/builds;region=us-central1/b3257414-5321-4652-98e3-e0a0eb5be6e1?project=k8s-release

Does this PR introduce a user-facing change?

Instead of excluding the .git directory from the source archive, krel now wipes out all remote credentials before packaging the source.

@kubernetes-prow kubernetes-prow Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/release-eng Issues or PRs related to the Release Engineering subproject approved Indicates a PR has been approved by an approver from all required OWNERS files. sig/release Categorizes an issue or PR as relevant to SIG Release. labels Aug 24, 2026
@puerco

puerco commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

Confirmed that the remotes don't have the credentials:

image

@saschagrunert saschagrunert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM overall - sound fix for the regression. Three minor observations inline.

Comment thread pkg/build/push.go
Comment thread pkg/build/push.go
Comment thread pkg/build/push.go
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@carabiner.dev>
@puerco

puerco commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

OK, it seems the only real action item was adding a comment. I've added it so this should be ready to go. PTAL

@saschagrunert saschagrunert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks for the quick fix!

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 26, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: puerco, saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow
kubernetes-prow Bot merged commit 65972e7 into kubernetes:master Aug 26, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants