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

github remotes not supported #560

Closed
AnthonySteele opened this issue Nov 24, 2018 · 5 comments
Closed

github remotes not supported #560

AnthonySteele opened this issue Nov 24, 2018 · 5 comments
Labels

Comments

@AnthonySteele
Copy link
Member

If I run with repo C:\Code\JustEat.StatsD this should inspect the local repo and find the remotes.

But I get

Unhandled Exception: System.UriFormatException: Invalid URI: The URI scheme is not valid.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   at System.Uri..ctor(String uriString)
   at NuKeeper.Git.LibGit2SharpDiscoveryDriver.GetRemotes(Uri repositoryUri) in c:\Code\NuKeeper\NuKeeper.Git\LibGit2SharpDiscoveryDriver.cs:line 38

This is because there are remotes with e.g. name: "origin" and "url": git@github.com:AnthonySteele/JustEat.StatsD.git

And this cannot be cast as Url - it is not a http(s) url, although it is a format that github uses a lot.

It's clearly not a simple fix since a run for repo git@github.com:AnthonySteele/JustEat.StatsD.git fails similarly.

Do we try to convert these to the corresponding http urls (in this case https://github.com/AnthonySteele/JustEat.StatsD) or try to work with them as is?

@skolima
Copy link
Collaborator

skolima commented Nov 24, 2018

For the remote, the problem is: that's a different git authentication method. Quite likely ssh authentication will work where https doesn't (and vice versa).

@AnthonySteele
Copy link
Member Author

AnthonySteele commented Nov 24, 2018

Yeah, I think it's a ssh syntax. The question is, if we just store it in a string and then feed it back to LibGit2Sharp, will it work?

@AnthonySteele
Copy link
Member Author

AnthonySteele commented Nov 24, 2018

Otherwise the plan would be to manually specify the two separately, e.g. nukeeper repo --files-are-at C:\Code\JustEat.StatsD --remote-is-at https://github.com/AnthonySteele/JustEat.StatsD

@AnthonySteele
Copy link
Member Author

So if you prefix it with ssh , e.g. ssh:git@github.com:AnthonySteele/JustEat.StatsD.git then it is a valid Uri.

This doesn't make everything work, but it's a start.

@stale
Copy link

stale bot commented May 10, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 10, 2020
@stale stale bot closed this as completed May 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants