Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Problem with authentication on a private bitbucket repository #101

Open
rvdginste opened this issue Oct 2, 2016 · 3 comments
Open

Problem with authentication on a private bitbucket repository #101

rvdginste opened this issue Oct 2, 2016 · 3 comments

Comments

@rvdginste
Copy link
Contributor

I tried to use gitlink on Visual Studio 2013 with ReSharper 2016.2, and I am not very successful. :(
I have a (private) service X that consists of 3 projects: X.host, X.server and X.api. Each project has its own solution and its own git repo. X.server and X.api are normally published as nuget packages on a private nuget package repo, and I normally put the pdb files also in the nuget packages.

So, to test gitlink I built X.server and X.api and used the tool through commandline on those pdb files. Then I used those dlls and pdbs to build and deploy X.host. This is a windows nt service, so to debug this, I run visual studio as an administrator, open the X.host solution and attach to the service process.

I configured ReSharper (tools, external sources) to "navigation to sources", so that it would use symbol files. When i open the X.host code, and follow (go to declaration) class that are from X.server and X.api, ReSharper runs its decompiler on that code, which I think is strange: at that point I'm connected to a running process, it should find the real source, but I suppose this is a ReSharper issue. As soon as I put a breakpoint in the decompiled code, it seems that ReSharper (or Visual Studio?) tries to fetch the source. At that point I get a html file that asks me to login on Bitbucket.

I did follow the README that says to login into Bitbucket from Internet Explorer, but that does not seem to work. I tried the following:

  • Internet Explorer 11 (on Windows 10): login on bitbucket and save password (verified that the credentials are persisted in 'manage web credentials'); if I open another Internet Explorer window, I am logged in automatically
  • inside Visual Studio, open a web browser: login on bitbucket; if I open another web browser window in Visual Studio, I am logged in automatically

Any ideas on what I am doing wrong, or is it currently a problem to use this with private git repositories?

@GeertvanHorrik
Copy link
Contributor

Private git repositories are a problem. See #37, a proxy would be needed (but note that this would expose your code because the proxy will do the authentication and thus removes the need for client authentication).

You can look into #37 for a detailed discussion on this.

I think that R# doesn't support updated pdb files (though I am not 100 % sure), so when using R#, it will actually decompile and not use the source files on the internet as specified in the pdb.

@rvdginste
Copy link
Contributor Author

Thanks for the speedy reply. It's a bit of a bummer though. Up until now I've always published the pdb files together with the dlls in the nuget packages, but that doesn't give access to the correct (version of the) source. Then I wanted to try nuget symbol packages with the myget symbol server and did not manage to get that to work. I had read about gitlink before and always meant to try it and thought it might be more straightforward, but this is blocking for me.

Anyways, a simple authenticating proxy as in #37 or a more advanced proxy like the one that @shonnly made (see #66) might be an option. Personally, I would be fine with running a local proxy for the latter.

Either way, I think it would be best to change the section "Source Stepping returns HTML" from the README: it gave me the impression it is supposed to work.

@GeertvanHorrik
Copy link
Contributor

Thanks for the feedback. Interested in doing a PR on the readme?

rvdginste added a commit to rvdginste/GitLink that referenced this issue Oct 2, 2016
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

2 participants