Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Git URL rewrite issue for HTTPS URLs #952

Merged
merged 3 commits into from
Nov 30, 2021

Conversation

HeavyWombat
Copy link
Contributor

@HeavyWombat HeavyWombat commented Nov 30, 2021

Changes

Avoid using git config

Using git config has the disadvantage that it also changes the Git config
in the development system when running the test cases.

Rename addtlCredArgs to addtlGitArgs to be more generic.

Use -c Git flag to supply specific configuration instead of using Git config.

Move Git URL rewrite into private key section

The Git URL rewrite logic was located outside of the credentials section of the
code, which means it was used in any case. However, it does not make sense to
be used in combination with a HTTPS URL and basic auth.

Move section as-is into the private key section and setup.

Fix Git URL rewrite issue for HTTPS URLs

Fix credentials checks to allow for the combination of:

  • HTTPS URL,
  • private SSH key, and
  • Git URL rewrite enabled.

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

Fixed issue where a HTTPS URL and private SSH key could not be used due to the credentials verification routine not taking the Git URL rewrite flag into account.

Using `git config` has the disadvantage that it also changes the Git config
in the development system when running the test cases.

Rename `addtlCredArgs` to `addtlGitArgs` to be more generic.

Use `-c` Git flag to supply specific configuration instead of using Git config.
The Git URL rewrite logic was located outside of the credentials section of the
code, which means it was used in any case. However, it does not make sense to
be used in combination with a HTTPS URL and basic auth.

Move section as-is into the private key section and setup.
Fix credentials checks to allow for the combination of:
- HTTPS URL,
- private SSH key, and
- Git URL rewrite enabled.
@openshift-ci openshift-ci bot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. release-note Label for when a PR has specified a release note and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Nov 30, 2021
@HeavyWombat HeavyWombat added the kind/bug Categorizes issue or PR as related to a bug. label Nov 30, 2021
@HeavyWombat HeavyWombat changed the title fix/git rewrite issue Fix Git URL rewrite issue for HTTPS URLs Nov 30, 2021
Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 left a comment

Choose a reason for hiding this comment

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

@HeavyWombat I wonder if no release no would be more correct because we fix a bug in unreleased code ? Not sure if we ever honored this on the other hand.

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 30, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 30, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SaschaSchwarze0

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

The pull request process is described here

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 30, 2021
@openshift-merge-robot openshift-merge-robot merged commit f231642 into main Nov 30, 2021
@SaschaSchwarze0 SaschaSchwarze0 added this to the release-v0.7.0 milestone Dec 9, 2021
@SaschaSchwarze0 SaschaSchwarze0 deleted the fix/git-rewrite-issue branch December 13, 2021 17:57
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. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Label for when a PR has specified a release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants