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

Add a warning when using deprecated or insecure SCM URLs #393

Merged
merged 1 commit into from Nov 12, 2022

Conversation

basil
Copy link
Member

@basil basil commented Nov 12, 2022

A variety of plugins use deprecated (e.g. git://``) or insecure (e.g., http://`) SCM URLs, or URLs that cause problems for PCT. This PR adds a new (soft) warning that highlights such problems and provides a correction to the user. This shouldn't be very disruptive since I have already filed PRs to update the most egregious violations. I tested this on some of the same changes that I already filed PRs for to confirm that the suggestions match what I actually submitted in the PRs (before authoring this change).

@basil basil changed the title Add a warning when using deprecated SCM URLs Add a warning when using deprecated or insecure SCM URLs Nov 12, 2022
@basil basil merged commit 126178b into jenkinsci:master Nov 12, 2022
@basil basil deleted the scm branch November 12, 2022 20:33

private static final String GIT_URLS_ARE_DEPRECATED = "git:// URLs are deprecated";
private static final String HTTP_URLS_ARE_INSECURE = "http:// URLs are insecure";
private static final String SSH_URLS_DO_NOT_WORK_WELL_WITH_PCT = "ssh:// URLs do not work well with PCT";
Copy link
Member

@Vlatombe Vlatombe Jan 11, 2023

Choose a reason for hiding this comment

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

I don't think it's really an argument. If they don't work well with pct as is, PCT should run with something like

[url "https://github.com/"]
	insteadOf = "ssh://git@github.com:"
	pushInsteadOf = "ssh://git@github.com:"

in its git configuration, guaranteeing that https is used in a homogeneous way even if the plugin has ssh configured.

Other variants can be used for other protocols.

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

Successfully merging this pull request may close these issues.

None yet

3 participants