libgit2sharp
libgit2sharp copied to clipboard
Remote URL includes both username & access token.
using var repo = new Repository(repoPath);
var remote = repo.Network.Remotes["origin"]?.Url;
Remote will contain both the user & the token used in cloning.
https://git-user:[email protected]/orgname/reponame.git