ankitbko / vscode-pull-request-azdo

Azure Devops Pull Requests for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ankitbko.vscode-pull-request-azdo
MIT License
65 stars 23 forks source link

No remote is found - Probably an authentication problem? #25

Closed yoadsn closed 3 years ago

yoadsn commented 3 years ago

Hi, I am using Git-Credential-Manager-Core to manage the git authentication. It generates the PAT without me controlling the scopes.

I don't get errors in the logs - just that no remote by that name exists (but it does):

[Debug 1614681026.065s] azdo_component> Manual personal access token option chosen.
[Debug 1614681029.669s] PAT token is not provided
[Debug 1614681029.68s] Looking for git repository
[Debug 1614681029.68s] Git repository found, initializing review manager and pr tree view.
[Debug 1614681029.709s] azdo_component> Manual personal access token option chosen.
[Debug 1614681030.661s] PAT token is not provided
[Debug 1614681030.662s] Review> Validate state in progress
[Debug 1614681030.662s] Review> Validating state...
[Debug 1614681030.665s] No remote with name 'origin' found.
[Debug 1614681030.665s] No remote with name 'upstream' found.
[Debug 1614681030.665s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1614681030.679s] No GitHub remotes found
[Debug 1614681030.696s] Review> no matching pull request metadata found for current branch master
[Debug 1614681030.697s] Review> no matching pull request metadata found on GitHub for current branch master
[Debug 1614683708.649s] Review> Queuing additional validate state
[Debug 1614683708.649s] Review> Validating state...
[Debug 1614683708.653s] No remote with name 'origin' found.
[Debug 1614683708.653s] No remote with name 'upstream' found.

I am unable to "sign in" in the tab because the only option is to "sign out" (which does nothing). image

I use mac OSX with the latest vscode.

Wdyt?

ankitbko commented 3 years ago

Can you share what orgUrl and projectname you have specified?

yoadsn commented 3 years ago

Hi, Thank you so much - Would love to help to get this working. I envy Github users having PR work done directly in VS code so just let me know how I can help.

I just got v0.15 updated and I got an option to enter a custom PAT. (did that, correct scopes). Still I see no PRs - here is the info you requested: Project Name: Wescover Platform Url: https://wescover.visualstudio.com

Here is the new log from v0.15:

[Debug 1614754918.5s] AzdoRepository> projectName is Wescover Platform
[Debug 1614754918.5s] AzdoRepository> orgUrl is https://wescover.visualstudio.com
[Debug 1614754918.575s] azdo_component> Manual personal access token option chosen.
[Debug 1614754929.542s] PAT token is not provided
[Debug 1614754929.553s] Looking for git repository
[Debug 1614754929.555s] Git repository found, initializing review manager and pr tree view.
[Debug 1614754929.555s] AzdoRepository> projectName is Wescover Platform
[Debug 1614754929.555s] AzdoRepository> orgUrl is https://wescover.visualstudio.com
[Debug 1614754929.706s] azdo_component> Manual personal access token option chosen.
[Debug 1614755102.847s] AzdoRepository> projectName is Wescover Platform
[Debug 1614755102.848s] AzdoRepository> orgUrl is https://wescover.visualstudio.com
[Debug 1614755103.341s] AzdoRepository> Auth> Successful: Logged userid: <<redacted>>
[Debug 1614755103.532s] AzdoRepository> Auth> Successful: Logged userid: <<redacted>>
[Debug 1614755104.019s] Review> Validate state in progress
[Debug 1614755104.019s] Review> Validating state...
[Debug 1614755104.023s] No remote with name 'origin' found.
[Debug 1614755104.023s] No remote with name 'upstream' found.
[Debug 1614755104.023s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1614755104.03s] No GitHub remotes found
[Debug 1614755104.043s] Review> no matching pull request metadata found for current branch master
[Debug 1614755104.044s] Review> no matching pull request metadata found on GitHub for current branch master
ankitbko commented 3 years ago

What does git remote -v prints?

yoadsn commented 3 years ago

Here:

origin  https://wescover.visualstudio.com/DefaultCollection/Wescover%20Platform/_git/wescover-around (fetch)
origin  https://wescover.visualstudio.com/DefaultCollection/Wescover%20Platform/_git/wescover-around (push)
ankitbko commented 3 years ago

I have published v0.0.16 which hopefully should fix this problem. Please try it out and let me know. You will need to enter a PAT token if it asks again.

yoadsn commented 3 years ago

Thank You! That seems to do it. That domain inclusion by suffix makes sense. We use the old URL structure still. Btw. It did not ask from the PAT again. I am playing with the extension and will report any feedback. Again - If I can help in anyway let me know!