mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
fixed code to use ssh clone url for private repos
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user