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

Incorrect UI while using a non-GitHub repo #164

Closed
Nettsentrisk opened this Issue Dec 14, 2015 · 10 comments

Comments

Projects
None yet
3 participants
@Nettsentrisk

I use this plugin for repos both on GitHub and our company's own Git repo.

When using the company repo, and I go to Synchronization, it gives me the following warning at the top: "You are not logged in to [server address], so certain git operations may fail. Login now"

The login now assumes I want to log into GitHub Enterprise, although I'm already logged in to my company's git server/repo. I can commit and everything to the company repo just fine.

So why is this message claiming otherwise? Why is it trying to get me to log in to GitHub Enterprise for a non-GitHub URL/server?

It also shows the company git server repo listed under GitHub on the Home tab, and it shows a bunch of GitHub-specific functionality under the Project toggle, like Pulse and Graphs, even though it's not a GitHub repo.

@Nettsentrisk Nettsentrisk changed the title from Incorrect message about not being logged in to Incorrect UI while using a non-GitHub repo Dec 14, 2015

@shana shana added the bug label Dec 15, 2015

@shana shana self-assigned this Dec 15, 2015

@shana

This comment has been minimized.

Show comment
Hide comment
@shana

shana Dec 15, 2015

Collaborator

Thanks for the report. It looks like the logic for determining whether the server is a GitHub server or not is getting a false positive on your server. It's hard to tell whether a remote with a non github.com url is an enterprise server or not, because when you're not logged in on an enterprise instance, the likely response to a GitHub API request is going to be similar to what you get when you try to call an API on a non-GitHub server.

The extra information you're seeing in the UI is calculated locally because it thinks the remote is an enterprise github instance. It is just for informational purposes (albeit incorrect in this case) and doesn't affect any git or other operations in Visual Studio, so you don't have to worry about that having any side effects other than showing (annoying) messages and extra buttons.

We'll get working on a fix for this and update the issue when it's out.

Collaborator

shana commented Dec 15, 2015

Thanks for the report. It looks like the logic for determining whether the server is a GitHub server or not is getting a false positive on your server. It's hard to tell whether a remote with a non github.com url is an enterprise server or not, because when you're not logged in on an enterprise instance, the likely response to a GitHub API request is going to be similar to what you get when you try to call an API on a non-GitHub server.

The extra information you're seeing in the UI is calculated locally because it thinks the remote is an enterprise github instance. It is just for informational purposes (albeit incorrect in this case) and doesn't affect any git or other operations in Visual Studio, so you don't have to worry about that having any side effects other than showing (annoying) messages and extra buttons.

We'll get working on a fix for this and update the issue when it's out.

@shana shana added this to the 1.0.16.1 - Bug fixes milestone Dec 15, 2015

@OsirisTerje

This comment has been minimized.

Show comment
Hide comment
@OsirisTerje

OsirisTerje Dec 17, 2015

I see the same when logged in to a TFS (on-premises) git repository, and I would assume it should be possible to see the difference between a TFS git instance and a github instance, right ?

I see the same when logged in to a TFS (on-premises) git repository, and I would assume it should be possible to see the difference between a TFS git instance and a github instance, right ?

@shana

This comment has been minimized.

Show comment
Hide comment
@shana

shana Dec 17, 2015

Collaborator

@OsirisTerje I don't believe I said it wasn't possible to tell the difference, I merely said that the current code is giving a false positive on certain non-GitHub instances. Obviously your on-premises git server is similarly being misdetected.

Collaborator

shana commented Dec 17, 2015

@OsirisTerje I don't believe I said it wasn't possible to tell the difference, I merely said that the current code is giving a false positive on certain non-GitHub instances. Obviously your on-premises git server is similarly being misdetected.

@OsirisTerje

This comment has been minimized.

Show comment
Hide comment
@OsirisTerje

OsirisTerje Dec 17, 2015

@shana Ok :-) If you need some fiddler trace or whatever, just ping.

@shana Ok :-) If you need some fiddler trace or whatever, just ping.

@shana

This comment has been minimized.

Show comment
Hide comment
@shana

shana Dec 17, 2015

Collaborator

@OsirisTerje Actually... if you could do "curl -vv https://your-git-server/site/sha" on a command line and gist the result (or with a browser and Fiddler it), that would be great! Redact whatever you need, I just want to see the http status code and the headers it returns to you (the code right now is being overly naive, I need to be more specific about parsing responses)

Collaborator

shana commented Dec 17, 2015

@OsirisTerje Actually... if you could do "curl -vv https://your-git-server/site/sha" on a command line and gist the result (or with a browser and Fiddler it), that would be great! Redact whatever you need, I just want to see the http status code and the headers it returns to you (the code right now is being overly naive, I need to be more specific about parsing responses)

@shana

This comment has been minimized.

Show comment
Hide comment
@shana

shana Dec 17, 2015

Collaborator

(the "site/sha" should be exactly that string, just plug in your git instance base url)

Collaborator

shana commented Dec 17, 2015

(the "site/sha" should be exactly that string, just plug in your git instance base url)

@OsirisTerje

This comment has been minimized.

Show comment
Hide comment
@OsirisTerje

OsirisTerje Dec 17, 2015

It returns this: https://gist.github.com/OsirisTerje/48b62682d6df994276f2
Is this what you're looking for ?

It returns this: https://gist.github.com/OsirisTerje/48b62682d6df994276f2
Is this what you're looking for ?

@OsirisTerje

This comment has been minimized.

Show comment
Hide comment
@OsirisTerje

OsirisTerje Dec 17, 2015

There are two responses, one if authorized (404), and one if not (401). Added the latter too to the gist above

There are two responses, one if authorized (404), and one if not (401). Added the latter too to the gist above

@shana

This comment has been minimized.

Show comment
Hide comment
@shana

shana Dec 17, 2015

Collaborator

@OsirisTerje That's perfect, thanks!

Collaborator

shana commented Dec 17, 2015

@OsirisTerje That's perfect, thanks!

@shana

This comment has been minimized.

Show comment
Hide comment
@shana

shana Dec 18, 2015

Collaborator

A fix for this issue will be included in release 1.0.16.1, which will be out before Monday.
If you could test the fix and let me know how it goes, that would be great! The vsix package is available from https://github.com/github/VisualStudio/releases/tag/v1.0.16.1

Collaborator

shana commented Dec 18, 2015

A fix for this issue will be included in release 1.0.16.1, which will be out before Monday.
If you could test the fix and let me know how it goes, that would be great! The vsix package is available from https://github.com/github/VisualStudio/releases/tag/v1.0.16.1

@Haacked Haacked closed this in #165 Dec 18, 2015

@shana shana referenced this issue Dec 18, 2015

Merged

Release 1.0.16.2 #171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment