Repository navigation
feat(origin): accept the SSH login in a <vcs>+ssh location - #11
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
git+ssh://git@host/path, hg+ssh:// and svn+ssh:// carry a user name; it is part of the identity and of the address the VCS executable is given. A password anywhere and a user name on any other transport stay refused. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…// directly A <vcs>+file location has no authority, so its last @ is always the version's; on Windows the path may be written with backslashes and no slash ends it. Co-Authored-By: jason.han <hanhuijun@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
syspi add git+ssh://git@github.com/owner/repo@1.0.0was refused ("a user name or password in the host is not supported"), so every SSH remote that expects a fixed login needed aUserentry inssh_configfirst.A user name is now accepted in the authority of a
<vcs>+ssh://location (git+ssh,hg+ssh,svn+ssh). Still refused: a password on any transport (user:pw@,user:@), and a user name on any other transport, where it would be a credential.pkg:git/user@host/pathmeansgit+httpsand is refused by the same rule, so the alias and the bare notation agree.Identity
.project.jsonand the lock'sresourceinside the percent-encodedvcs_url(…git%2Bssh:%2F%2Fgit%40github.com%2F…); the lock'ssource, the address the VCS executable receives, isssh://git@github.com/….git+ssh://git@host/pandgit+ssh://host/pare two identities, asgit+httpsandgit+sshalready are: each is resolved through its own address and locked under its ownresource; a lock entry of one never satisfies a usage of the other.lib/<publisher>-<name>_<version>does not carry it. Two usages differing only in the user name are locked as two entries with the samerevisionandsha256and installed once; different contents for one directory fail the run, as before.-is refused (it would reachsshas an option).user:password@and any userinfo on other schemes.Annex B.3.5
The Annex (informative) says "Using user names and password in the host_name is not supported and should be reported by tools as an error", and in the same clause that its syntax is pip's, whose examples include
git+ssh://git@git.example.com/MyProject. This change departs from that recommendation for the SSH login only;docs/packages.mdsays so explicitly rather than presenting it as something the Annex permits.Tests
internal/origin: acceptance, canonical form and round trip for git/hg/svn, port, case, escaped and empty user name; refusals; identity and key distinctness.internal/vcs: the exact argv each executable receives (stand-in executables onPATH), redaction.internal/install:locationKeykeeps the user name and its case.tests/e2e: realgitover the ssh transport with a stand-in for thesshprogram (records the destination, runs the remote command locally): both spellings, lock contents, sharedlib/directory, offline reuse, switching spelling, refusals never reaching ssh. Skipped on Windows (POSIX shell stand-in).Overlap
internal/install/install.go,internal/install/install_test.goanddocs/packages.mdare also touched by #9,README.mdby #8; hereinstall.gochanges onlylocationKey.🟢 Devin Review found nothing to fix · View findings