Skip to content

Use authentication in GitPreparer.GetRemoteReference - #468

Merged
JakeGinnivan merged 1 commit into
GitTools:masterfrom
johannesegger:use-authentication
Jun 17, 2015
Merged

JakeGinnivan merged 1 commit into
GitTools:masterfrom
johannesegger:use-authentication

Conversation

@johannesegger

Copy link
Copy Markdown

You already had a helper for this (GitHelper.GetRemoteTipsUsingUsernamePasswordCredentials), but it was internal. I made it public.

I saw somewhere else that you used repository.Network.Remotes.Single(), which fails when there are multiple remotes, so I'm not sure if it's ok that I also used it.

@JakeGinnivan

Copy link
Copy Markdown
Contributor

@nulltoken can you have a quick look over this one?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why public rather than internal?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I overlooked that GitVersionCore internals are visible in GitVersionExe.

@nulltoken

Copy link
Copy Markdown
Contributor

@nulltoken can you have a quick look over this one?

Sir! Done, Sir!

@johannesegger

Copy link
Copy Markdown
Author

Thanks for your feedback.

I now added an overload of GitHelper.GetRemoteTipsUsingUsernamePasswordCredentials that creates a temporary remote and calls the original GetRemoteTipsUsingUsernamePasswordCredentials with this remote. I used a Guid for the remote name. Although it's not perfect, it should be ok most of the time.

@nulltoken

Copy link
Copy Markdown
Contributor

🆒 Looks 👍 to me.

JakeGinnivan added a commit that referenced this pull request Jun 17, 2015
Use authentication in `GitPreparer.GetRemoteReference`
@JakeGinnivan
JakeGinnivan merged commit 2201f0d into GitTools:master Jun 17, 2015
@JakeGinnivan

Copy link
Copy Markdown
Contributor

Thanks for your help @nulltoken!

@nulltoken

Copy link
Copy Markdown
Contributor

@JakeGinnivan As always, feel free to ping me!

@johannesegger
johannesegger deleted the use-authentication branch June 17, 2015 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants