Skip to content

Commit

Permalink
Temporarily disable SSH support, so that checkout works
Browse files Browse the repository at this point in the history
  • Loading branch information
timja committed Feb 4, 2020
1 parent d55dbe7 commit 2875181
Showing 1 changed file with 1 addition and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,32 +225,7 @@ public GitHubSCMBuilder withCredentials(String credentialsId, RepositoryUriResol
@NonNull
public static RepositoryUriResolver uriResolver(@CheckForNull Item context, @NonNull String apiUri,
@CheckForNull String credentialsId) {
if (credentialsId == null) {
return HTTPS;
} else {
StandardCredentials credentials = CredentialsMatchers.firstOrNull(
CredentialsProvider.lookupCredentials(
StandardCredentials.class,
context,
context instanceof Queue.Task
? ((Queue.Task) context).getDefaultAuthentication()
: ACL.SYSTEM,
URIRequirementBuilder.create()
.withHostname(RepositoryUriResolver.hostnameFromApiUri(apiUri))
.build()
),
CredentialsMatchers.allOf(
CredentialsMatchers.withId(credentialsId),
CredentialsMatchers.instanceOf(StandardCredentials.class)
)
);
if (credentials instanceof SSHUserPrivateKey) {
return SSH;
} else {
// Defaults to HTTP/HTTPS
return HTTPS;
}
}
return HTTPS;
}

/**
Expand Down

0 comments on commit 2875181

Please sign in to comment.