I'm using next code to push Tag to Git repository
#addin "Cake.Git"
using LibGit2Sharp;
var solutionFolder = "./";
var versionTag = "someTag";
Task("Default")
.Does(() =>
{
var remoteRepository = EnvironmentVariable("bamboo_planRepository_repositoryUrl");
var repositoryRevision = EnvironmentVariable("bamboo_planRepository_revision");
var absolutePath = MakeAbsolute(Directory(solutionFolder));
var repoName = "central";
//LibGit2Sharp add remote
using (var repo = new Repository(absolutePath.FullPath))
{
repo.Network.Remotes.Add(repoName, remoteRepository);
}
GitTag(solutionFolder, versionTag, repositoryRevision);
GitPushRef(solutionFolder, gitUser, gitPassword, repoName, versionTag);
}
});
Stuck into the next issue: because our bamboo configured to use SSH protocol, and Cake.Git(LibGit2Sharp) currently doesn't support it receiving next error
Error: unsupported URL protocol
Thanks