SanderRonde / VSCode-Gerrit

Gerrit plugin for VSCode
https://marketplace.visualstudio.com/items?itemName=SanderRonde.vscode--gerrit
MIT License
31 stars 17 forks source link

Failed to work with repo via SSH #47

Closed honhantri1995 closed 11 months ago

honhantri1995 commented 11 months ago

Dear Sander,

This is the first time I use your extension, and I got an issue right at step "Gerrit: Check connection" The URL to my repo is not HTTP, but SSH. And it seems that your extension doesn't support SSH at the moment.

My question: Is it a bug? If not, then it would be very helpful (for me and lots of people) if SSH can be supported in the furture.

Note: Because this a business repo, I'm allowed to access it via SSH only.

Here is the output log: GET request to "ssh://xxx@vgit.yyy.com:29420/config/server/version" UnsupportedProtocolError: Unsupported protocol "ssh:" GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/I032887887115ebd0d0fd49527a0eedf3f5d6af8a/detail/" UnsupportedProtocolError: Unsupported protocol "ssh:" Invalid response GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/I032887887115ebd0d0fd49527a0eedf3f5d6af8a/detail/" UnsupportedProtocolError: Unsupported protocol "ssh:" Invalid response GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/I032887887115ebd0d0fd49527a0eedf3f5d6af8a/detail/" UnsupportedProtocolError: Unsupported protocol "ssh:" Invalid response GET request to "ssh://xxx@vgit.yyy.com:29420/a/accounts/self" UnsupportedProtocolError: Unsupported protocol "ssh:" Invalid response GET request to "ssh://xxx@vgit.yyy.com:29420/a/accounts/self" UnsupportedProtocolError: Unsupported protocol "ssh:" Invalid response GET request to "ssh://xxx@vgit.yyy.com:29420/a/config/server/version" UnsupportedProtocolError: Unsupported protocol "ssh:" GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/" GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/" GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/" GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/" GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/" UnsupportedProtocolError: Unsupported protocol "ssh:" UnsupportedProtocolError: Unsupported protocol "ssh:" UnsupportedProtocolError: Unsupported protocol "ssh:" UnsupportedProtocolError: Unsupported protocol "ssh:" UnsupportedProtocolError: Unsupported protocol "ssh:" GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/I032887887115ebd0d0fd49527a0eedf3f5d6af8a/detail/" GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/I032887887115ebd0d0fd49527a0eedf3f5d6af8a/detail/" GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/I032887887115ebd0d0fd49527a0eedf3f5d6af8a/suggest_reviewers/" GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/I032887887115ebd0d0fd49527a0eedf3f5d6af8a/suggest_reviewers/" GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/I032887887115ebd0d0fd49527a0eedf3f5d6af8a/drafts/" GET request to "ssh://xxx@vgit.yyy.com:29420/a/accounts/self" GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/I032887887115ebd0d0fd49527a0eedf3f5d6af8a/revisions/current//mergeable" UnsupportedProtocolError: Unsupported protocol "ssh:" UnsupportedProtocolError: Unsupported protocol "ssh:" UnsupportedProtocolError: Unsupported protocol "ssh:" UnsupportedProtocolError: Unsupported protocol "ssh:" UnsupportedProtocolError: Unsupported protocol "ssh:" UnsupportedProtocolError: Unsupported protocol "ssh:" UnsupportedProtocolError: Unsupported protocol "ssh:" Invalid response Invalid response Invalid response Invalid response Invalid response Invalid response Invalid response GET request to "ssh://xxx@vgit.yyy.com:29420/a/config/server/version" UnsupportedProtocolError: Unsupported protocol "ssh:" GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/I032887887115ebd0d0fd49527a0eedf3f5d6af8a/detail/" UnsupportedProtocolError: Unsupported protocol "ssh:" Invalid response GET request to "http://xxx@vgit.yyy.com/na/a/tiger/variant/services/v2xmgr/a/config/server/version" HTTPError: Response code 404 (Not Found) 404 [object Object] Not Found GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/I032887887115ebd0d0fd49527a0eedf3f5d6af8a/detail/" UnsupportedProtocolError: Unsupported protocol "ssh:" Invalid response GET request to "http://xxx@vgit.yyy.com/na/a/a/config/server/version" HTTPError: Response code 404 (Not Found) 404 [object Object] Not Found GET request to "ssh://xxx@vgit.yyy.com:29420/a/changes/I032887887115ebd0d0fd49527a0eedf3f5d6af8a/detail/" UnsupportedProtocolError: Unsupported protocol "ssh:" Invalid response

SanderRonde commented 11 months ago

This is intentional. The SSH API supports significantly fewer features than the HTTP API, and a lot of those are very essential to the extension working, so it's not really possible to have the extension work with "just" the SSH API.

Out of interest, is there no HTTP URL to your repo at all? I'd assume you use the web interface too right? Or is the HTTP API specifically disabled for that?

(will close for now since the issue's not really actionable but feel free to keep commenting)

honhantri1995 commented 11 months ago

Thank Sander, "is there no HTTP URL to your repo at all?" No, I actually have the HTTP URL, but due to the security policy of the company, I can only use SSH URL at the moment. Maybe I'll request HTTP URL permission. Anyway, your answer is clear. I have nothing to ask more. Thanks a lot