File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -160,14 +160,19 @@ func GetGitPlan(
160160 }
161161
162162 var cloneArg string
163+ cloneToken := os .Getenv ("SHUTTLE_GIT_TOKEN" )
163164 if parsedGitPlan .Protocol == "https" {
164- cloneToken := os .Getenv ("SHUTTLE_GIT_TOKEN" )
165165 if cloneToken == "" {
166166 cloneArg = "https://" + parsedGitPlan .Repository
167167 } else {
168168 cloneArg = fmt .Sprintf ("https://%s@%s" , cloneToken , parsedGitPlan .Repository )
169+ uii .Verboseln ("Found clone token in env. Overriding clone path to %s" , cloneArg )
169170 }
170171 } else if parsedGitPlan .Protocol == "ssh" {
172+ if cloneToken != "" {
173+ uii .Verboseln ("Found clone token in env, but shuttle path was ssh-based. This override will not work." )
174+ }
175+
171176 cloneArg = parsedGitPlan .User + "@" + parsedGitPlan .Repository
172177 } else {
173178 panic (fmt .Sprintf ("Unknown protocol '%s'" , parsedGitPlan .Protocol ))
You can’t perform that action at this time.
0 commit comments