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/auth): fix insteadOf for bitbucket-server #29951

Merged
merged 6 commits into from
Jul 20, 2024

Conversation

amezin
Copy link
Contributor

@amezin amezin commented Jun 30, 2024

Changes

Fix git submodule update on Bitbucket Server/Data Center.

Context

#29527 fixed dependency extraction, but update still fails - Renovate tries to clone submodules over SSH, because none of generated url.*.instanceOf matches.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@amezin
Copy link
Contributor Author

amezin commented Jun 30, 2024

This works only if default ports are used.

A more correct solution is possible: almost all (if not all) platforms return both HTTP(S) and SSH git URLs in API. These URLs can be used to figure out base URLs for both protocols, and then perform translation (both in url.*.insteadOf and in getHttpUrl()). This would also handle the case when HTTP(S) repository access is disabled (possible according to comments in bitbucket-server module). But it'll be a non-trivial change, I'm not sure how exactly to implement it.

lib/util/git/auth.ts Outdated Show resolved Hide resolved
@rarkins rarkins added this pull request to the merge queue Jul 20, 2024
Merged via the queue into renovatebot:main with commit f3ef173 Jul 20, 2024
38 checks passed
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 37.436.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@@ -350,6 +350,27 @@ describe('util/git/auth', () => {
GIT_CONFIG_VALUE_2: 'https://github.com:89/org/repo.git',
});
});

Choose a reason for hiding this comment

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

get data info and report bugs

Copy link

@Tripp1984 Tripp1984 Jul 22, 2024

Choose a reason for hiding this comment

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

Iam

Choose a reason for hiding this comment

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

Iam

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants