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

Wrong remote protocol #1488

Closed
Glandos opened this issue Feb 8, 2020 · 3 comments
Closed

Wrong remote protocol #1488

Glandos opened this issue Feb 8, 2020 · 3 comments
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@Glandos
Copy link

Glandos commented Feb 8, 2020

  • Extension version: 0.14.0
  • VSCode Version: 1.42.0
  • OS: Debian/unstable

Steps to Reproduce:

  1. Try to checkout a PR within a repository where the remote is configured like origin git@github.com:Glandos/project.git
  2. The created remote for the PR is author git://git@github.com:author/project
  3. The checkout fails with:

[Info] Review> checkout failed #{"message":"Failed to execute git","stdout":"","stderr":"fatal: unable to look up git@github.com:author (port 9418) (Name or service not known)\n","exitCode":128,"gitCommand":"fetch"}

@alexr00 alexr00 added the bug Issue identified by VS Code Team member as probable bug label Nov 11, 2020
@therealchjones
Copy link

By chance were you working from a fork of the original repository where the PR was submitted? I got the same error as you as follows (specifics left in for reproducibility):

  1. fork HearthSim/decrunch to therealchjones/decrunch
  2. clone (in vs code) therealchjones/decrunch
  3. open extension->Pull Requests->All open->Test: GitHub Pull Request support #15->Description
  4. checkout using arrow or button
Log (with error):
[Info] Looking for git repository
[Info] Git repository found, initializing review manager and pr tree view.
[Info] Review> Validate state in progress
[Info] Review> Validating state...
[Info] No remote with name 'upstream' found.
[Info] Found GitHub remote
[Info] Review> no matching pull request metadata found for current branch master
[Info] Review> Queuing additional validate state
[Info] Review> no matching pull request metadata found on GitHub for current branch master
[Info] Review> Validating state...
[Info] Found GitHub remote
[Info] Review> no matching pull request metadata found for current branch master
[Info] Review> no matching pull request metadata found on GitHub for current branch master
[Info] Review> switch to Pull Request #15 - start
[Info] PullRequestGitHelper> Branch pr/kirafanautodec/15 is from a fork. Create a remote first.
[Info] PullRequestGitHelper> create remote for https://github.com/kirafanautodec/decrunch.
[Info] Review> checkout failed #{"message":"Failed to execute git","stdout":"","stderr":"fatal: unable to look up git@github.com:kirafanautodec (port 9418) (nodename nor servname provided, or not known)\n","exitCode":128,"gitCommand":"fetch","gitArgs":["fetch","kirafanautodec","master:pr/kirafanautodec/15","--depth=1"]}
[Info] Review> Queuing additional validate state
[Info] Review> Validating state...
[Info] Found GitHub remote
[Info] Review> no matching pull request metadata found for current branch master
[Info] Review> no matching pull request metadata found on GitHub for current branch master

However, everything worked as expected when I cloned the original (where the PR was actually submitted):

  1. clone (in vs code) HearthSim/decrunch
  2. open extension->Pull Requests->All open->Test: GitHub Pull Request support #15->Description
  3. checkout using arrow or button
Log (with success):
[Info] Looking for git repository
[Info] Git repository found, initializing review manager and pr tree view.
[Info] Review> Validate state in progress
[Info] Review> Validating state...
[Info] No remote with name 'upstream' found.
[Info] Found GitHub remote
[Info] Review> no matching pull request metadata found for current branch master
[Info] Review> no matching pull request metadata found on GitHub for current branch master
[Info] Review> switch to Pull Request #15 - start
[Info] PullRequestGitHelper> Branch pr/kirafanautodec/15 is from a fork. Create a remote first.
[Info] PullRequestGitHelper> create remote for https://github.com/kirafanautodec/decrunch.
[Info] PullRequestGitHelper> associate pr/kirafanautodec/15 with Pull Request #15
[Info] Review> Review> switch to Pull Request #15 - done
[Info] Review> Queuing additional validate state
[Info] Review> Validating state...
[Info] No remote with name 'upstream' found.
[Info] Found GitHub remote
[Info] Review> current branch pr/kirafanautodec/15 is associated with pull request #15
[Info] Review> Resolving pull request
[Info] Review> Fetching pull request data
[Info] Review> register comments provider
[Info] Review> display pull request status bar indicator and refresh pull request tree view.

I suppose it can be argued whether PRs for the original repo should be shown in the forked repo by the extension, as they're not shown that way on GitHub itself. The bug in this case might be resolved by not displaying them at all, but if it's decided they should be displayed then they should probably be just as "checkout-able" as others.

@alexr00
Copy link
Member

alexr00 commented Dec 12, 2022

I tried this out, and I wasn't able to reproduce the issue. If you're still seeing it please ping this issue or open a new one and I will investigate further!

@alexr00 alexr00 closed this as completed Dec 12, 2022
@Glandos
Copy link
Author

Glandos commented Dec 12, 2022

It's been a while without hitting this issue. I guess some commit made a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants