Skip to content

Improve Git repository authentication handling#356

Open
dylangovender wants to merge 3 commits intoInseeFrLab:mainfrom
dylangovender:fix-git-token-issue
Open

Improve Git repository authentication handling#356
dylangovender wants to merge 3 commits intoInseeFrLab:mainfrom
dylangovender:fix-git-token-issue

Conversation

@dylangovender
Copy link
Contributor

We run Onyxia in an environment where repositories are hosted across GitHub, GitLab, and Bitbucket. While testing the init script, we found that cloning from Bitbucket instances did not work correctly because the authentication pattern differs from GitHub and GitLab.

This change adds a Bitbucket-specific authentication pattern (username:token@host) so that repositories hosted on Bitbucket can be cloned successfully.

It also changes the sed delimiter from / to | when rewriting the repository URL. Using / caused issues when tokens contained characters that conflicted with the delimiter.

These changes were tested in our environment and cloning now works correctly for GitHub, GitLab, and Bitbucket repositories.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant