Skip to content

Enhance get_source_tarball_from_git to ensure that Git repo URL does not contain double slashes due to trailing slash in source URL#5097

Merged
boegel merged 1 commit intoeasybuilders:developfrom
Crivella:fix-url_doubleslashes
Jan 28, 2026
Merged

Enhance get_source_tarball_from_git to ensure that Git repo URL does not contain double slashes due to trailing slash in source URL#5097
boegel merged 1 commit intoeasybuilders:developfrom
Crivella:fix-url_doubleslashes

Conversation

@Crivella
Copy link
Copy Markdown
Contributor

@Crivella Crivella commented Jan 21, 2026

I've encountered this when trying to install a package that requires a git lfs pull before installing in order to bring in some optional files.

If the url in git_config is written with a trailing slash, the final url will contain a double slash, eg

            'git_config': {
                'url': 'https://github.com/SOME_USER/',
                'repo_name': 'SOME_REPO',
                ...
            }

where the URL will result in https://github.com/SOME_USER//SOME_REPO

GIT deals with this fine, by collapsing the double-slash into one when interpreting the URL, but the version with the double-slash is what is written by git clone in the .git/config
This causes a generic connection error when calling git lfs pull due to it not being able to handle the double-slash in the URL.

This minor fix ensures that trailing slashes in the url of git_configs is properly removed as it is re-added when joining the url with the repo_name

Even if there exists url's where the double-slash is required i would argue that we should not rely on the string joining logic for it and probably add it to the repo_name
An alternative would be to check whether the url ends with a slash and only add an extra one if it does not

@boegel boegel added this to the next release (5.2.1?) milestone Jan 27, 2026
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

lgtm

@boegel boegel changed the title Ensure git repo URL does not contan double-slahses due to trailing slash in source URL Ensure git repo URL does not contain double-slahses due to trailing slash in source URL Jan 28, 2026
@boegel boegel changed the title Ensure git repo URL does not contain double-slahses due to trailing slash in source URL Enhance get_source_tarball_from_git to ensure that Git repo URL does not contain double-slahses due to trailing slash in source URL Jan 28, 2026
@boegel boegel merged commit 4ba9c7e into easybuilders:develop Jan 28, 2026
40 checks passed
@Crivella Crivella deleted the fix-url_doubleslashes branch January 28, 2026 14:07
@boegel boegel changed the title Enhance get_source_tarball_from_git to ensure that Git repo URL does not contain double-slahses due to trailing slash in source URL Enhance get_source_tarball_from_git to ensure that Git repo URL does not contain double slashes due to trailing slash in source URL Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants