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

Add SSH username to Git over SSH documentation example #11838

Closed
1 task done
WilliamDEdwards opened this issue Mar 5, 2023 · 4 comments · Fixed by #11839
Closed
1 task done

Add SSH username to Git over SSH documentation example #11838

WilliamDEdwards opened this issue Mar 5, 2023 · 4 comments · Fixed by #11839
Labels
good first issue A good item for first time contributors to work on state: awaiting PR Feature discussed, PR is needed type: docs Documentation related

Comments

@WilliamDEdwards
Copy link
Contributor

Description

The documentation at https://pip.pypa.io/en/stable/topics/vcs-support/#git contains the following example:

MyProject @ git+ssh://git.example.com/MyProject

However, the line should contain a username:

MyProject @ git+ssh://git@git.example.com/MyProject

Expected behavior

No response

pip version

21.2.4

Python version

3.9.6

OS

macOS 12.5

How to Reproduce

  1. Run pip3 install 'MyProject @ git+ssh://git.example.com/MyProject' (without username)

Output

Without username:

(testvenv) williams-air:testvenv williamedwards$ pip3 install 'foobar @ git+ssh://example.com/foobar'
    fatal: '/foobar' does not appear to be a git repository
    fatal: Could not read from remote repository.

Code of Conduct

@WilliamDEdwards WilliamDEdwards added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Mar 5, 2023
@sinoroc
Copy link
Contributor

sinoroc commented Mar 15, 2023

However, the line should contain a username

Why? Where does this requirement come from? As far as I can tell, this is not necessary. In the SSH configuration it is possible to associate a host name with a user name.

Maybe the documentation could show an example for both with and without a user name. And maybe also with and without password or would that be seen as (inadvertently) encouraging a bad practice?

@WilliamDEdwards
Copy link
Contributor Author

However, the line should contain a username

Why? Where does this requirement come from? As far as I can tell, this is not necessary.

This can be found in the issue.

In the SSH configuration it is possible to associate a host name with a user name.

Expectations and prerequisites should be documented.

Maybe the documentation could show an example for both with and without a user name.

Commands should be usable with the default configuration.

And maybe also with and without password or would that be seen as (inadvertently) encouraging a bad practice?

Stick to the defaults. Advanced use cases should be handled by users themselves.

@sinoroc
Copy link
Contributor

sinoroc commented Mar 15, 2023

Right. Motivated like this, it seems to make much more sense than I initially thought. I agree.

@uranusjr uranusjr added type: enhancement Improvements to functionality type: docs Documentation related state: awaiting PR Feature discussed, PR is needed good first issue A good item for first time contributors to work on and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged type: enhancement Improvements to functionality labels Mar 16, 2023
@sinoroc
Copy link
Contributor

sinoroc commented Mar 17, 2023

@uranusjr Regarding the labels: there is already a PR: #11839

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue A good item for first time contributors to work on state: awaiting PR Feature discussed, PR is needed type: docs Documentation related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants