From 9693da6b6d2b5386358942ebd41ceb54c84fbe52 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 11 Apr 2019 17:23:26 -0400 Subject: [PATCH] Add warning when private repos fail to clone --- worker/tasks.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/worker/tasks.go b/worker/tasks.go index cca7080..a31a4ce 100644 --- a/worker/tasks.go +++ b/worker/tasks.go @@ -326,6 +326,10 @@ func (ctx *JobContext) CloneRepos() error { git.Stdout = ctx.LogFile git.Stderr = ctx.LogFile if err := git.Run(); err != nil { + ctx.Log.Println("Failed to clone repository. " + + "If this a private repository, make sure you've " + + "added a suitable SSH key.") + ctx.Log.Println("https://man.sr.ht/builds.sr.ht/private-repos.md") return errors.Wrap(err, "git clone") } if ref != "" { @@ -343,6 +347,10 @@ func (ctx *JobContext) CloneRepos() error { hg.Stdout = ctx.LogFile hg.Stderr = ctx.LogFile if err := hg.Run(); err != nil { + ctx.Log.Println("Failed to clone repository. " + + "If this a private repository, make sure you've " + + "added a suitable SSH key.") + ctx.Log.Println("https://man.sr.ht/builds.sr.ht/private-repos.md") return errors.Wrap(err, "hg clone") } if ref != "" { -- 2.38.5