Skip to content
This repository was archived by the owner on Dec 19, 2020. It is now read-only.

Obnoxious interaction of wit update with changing ssh to https #183

Open
jackkoenig opened this issue Dec 10, 2019 · 3 comments
Open

Obnoxious interaction of wit update with changing ssh to https #183

jackkoenig opened this issue Dec 10, 2019 · 3 comments

Comments

@jackkoenig
Copy link
Collaborator

If you use git config --global url.'https://github.com/'.insteadOf '[email protected]:, you'll get the following on wit update with v0.11.1 and master

[WARNING] Package 'chisel3' wants a different git remote origin.
Origin is currently:
  https://github.com/freechipsproject/chisel3.git
Package 'chisel3' wants origin:
  [email protected]:freechipsproject/chisel3.git
Please manually update the origin with:
  git -C /home/workspace/chisel3 \
    remote set-url origin [email protected]:freechipsproject/chisel3.git
@richardxia
Copy link
Member

I'm not exactly sure how we'd want to handle this, since these are technically two different remotes. It's only by convention that GitHub happens to configure both its HTTP Git servers and its SSH Git servers such that you can perform the [email protected]:foo/bar.git -> https://github.com/foo/bar.git transformation and vice versa. There's no guarantee that all Git servers which happen to support both HTTP and SSH protocols will preserve this mapping.

Just as a reminder, [email protected]:foo/bar.git is more or less equivalent to the SCP command scp [email protected]:foo/bar.git, which really means "SSH into the server at github.com using the username git and grab the directory located at foo/bar.git relative to my default directory (usually the home directory)". https://github.com/foo/bar.git is more or less equivalent to "Make an HTTP request to the server at github.com and to the path at foo/bar.git". Nothing requires that the two protocols have consistent naming conventions.

@mmjconolly
Copy link
Contributor

mmjconolly commented Dec 10, 2019

Does this warning stop forward progress?
If yes, perhaps we could have a --skip-remote-checks or --use-in-repo-remotes for people who run into this but then decide that it actually was ok to continue

@jackkoenig
Copy link
Collaborator Author

It doesn't stop forward progress, it's just annoying. There may just not be a reasonable solution other than perhaps built-in wit support for this (ie. fixing #150)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants