fixed code to use ssh clone url for private repos

This commit is contained in:
Brad Rydzewski
2014-07-12 00:22:54 -07:00
parent 5b4a8ef4ea
commit ecff154c56
4 changed files with 34 additions and 1 deletions

View File

@@ -41,6 +41,12 @@ func (c *Client) GetRepos(owner string) ([]*remote.Repo, error) {
// loop throught the list and convert to the standard repo format
for _, repo := range repos {
// if the repository is private we should use the ssh
// url to clone, else we should use the git url
if repo.Private {
repo.CloneUrl = repo.SshUrl
}
result = append(result, &remote.Repo{
ID: repo.ID,
Host: githuburl.Host,