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

Removes "git@" from git remote URL #169

Open
dev-rinchin opened this issue Nov 7, 2022 · 1 comment
Open

Removes "git@" from git remote URL #169

dev-rinchin opened this issue Nov 7, 2022 · 1 comment

Comments

@dev-rinchin
Copy link

dev-rinchin commented Nov 7, 2022

Hi, ClearML uses furl to remove a user from a git remote URL, so furl removes username when the remote URL is like "ssh://git@0.0.0.0:1234/path/to/repo.git" (with "ssh://git@"):

  • Ok:
    furl.furl("git@0.0.0.0:1234/path/to/repo.git").remove(username=True, password=True).tostr()
    expected: git@0.0.0.0:1234/path/to/repo.git
    received: git@0.0.0.0:1234/path/to/repo.git

  • Not as expected:
    furl.furl("ssh://git@0.0.0.0:1234/path/to/repo.git").remove(username=True, password=True).tostr()
    expected: ssh://git@0.0.0.0:1234/path/to/repo.git
    received: ssh://0.0.0.0:1234/path/to/repo.git

should I use more specific lib/tool to parse git-like URLs?

@qxeq
Copy link

qxeq commented Jan 2, 2024

To preserve git@, username needs to be set to False.

I believe the second case is the correct behavior, its just that the first example is missing the scheme so that the parser thinks git@0.0.0.0 is the scheme which is obviously incorrect.

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

No branches or pull requests

2 participants