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

Adds support of URL-like git ssh syntax #7509

Merged
merged 3 commits into from Aug 13, 2020

Conversation

wizardsd
Copy link
Contributor

@wizardsd wizardsd commented Aug 5, 2020

Changelog: Fix: Adds support of URL-like git ssh syntax.
Docs: omit

This PR fixes adds support of URL-like addresses mentioned #5833 (as for me, it was a regression introduced in #4207)

According to https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols git supports two kinds of addresses, URL-like: ssh://[user@]server/project.git and scp-like: [user@]server:project.git

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

#PYVERS: Macos@py27, Windows@py36, Linux@py27

closes #5833

…tocols git supports two kinds of addresses, URL-like: ssh://[user@]server/project.git and scp-like: [user@]server:project.git

This fix adds support of URL-like addresses
@CLAassistant
Copy link

CLAassistant commented Aug 5, 2020

CLA assistant check
All committers have signed the CLA.

@memsharded memsharded added this to the 1.29 milestone Aug 5, 2020
Copy link
Member

@jgsogo jgsogo left a comment

Thanks for the PR! 🎉

# URL-like syntax
self.assertEqual('ssh://git@github.com:2222/conan-io/conan.git',
SCMBase._remove_credentials_url(
'ssh://git@github.com:2222/conan-io/conan.git'))
Copy link
Member

@jgsogo jgsogo Aug 10, 2020

Choose a reason for hiding this comment

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

Add a test to check that we are actually removing the password:

self.assertEqual('ssh://git@github.com:2222/conan-io/conan.git',
                         SCMBase._remove_credentials_url(
                             'ssh://git:passwd@github.com:2222/conan-io/conan.git'))

jgsogo
jgsogo approved these changes Aug 10, 2020
Copy link
Member

@jgsogo jgsogo left a comment

LGTM! Thanks!

@jgsogo jgsogo merged commit 1fc5cb6 into conan-io:develop Aug 13, 2020
2 checks passed
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.

Removing credentials from 'url' for SCM doesn't play well with SSH git repository hosting
4 participants