File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
src/main/java/io/github/intisy/gradle/github/impl Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,7 @@ public String getRepoOwner() {
6464 }
6565
6666 private boolean isSshKey (String key ) {
67- return key != null && (
68- key .startsWith ("ssh-rsa" ) ||
69- key .startsWith ("ecdsa-sha2-nistp256" ) ||
70- key .startsWith ("ecdsa-sha2-nistp384" ) ||
71- key .startsWith ("ecdsa-sha2-nistp521" ) ||
72- key .startsWith ("ssh-ed25519" ) ||
73- key .startsWith ("sk-ecdsa-sha2-nistp256@openssh.com" ) ||
74- key .startsWith ("sk-ssh-ed25519@openssh.com" )
75- );
67+ return key != null && key .contains ("-----BEGIN" ) && key .contains ("PRIVATE KEY" );
7668 }
7769
7870 public CredentialsProvider getCredentialsProvider () {
@@ -133,7 +125,7 @@ public boolean isRepoUpToDate(File path) {
133125 .build ();
134126 Git git = new Git (repository )
135127 ) {
136- git .fetch ().setTransportConfigCallback (getTransportConfigCallback ()).call ();
128+ git .fetch ().setCredentialsProvider ( getCredentialsProvider ()). setTransportConfigCallback (getTransportConfigCallback ()).call ();
137129 String branch = repository .getBranch ();
138130 ObjectId localCommit = repository .resolve ("refs/heads/" + branch );
139131 ObjectId remoteCommit = repository .resolve ("refs/remotes/origin/" + branch );
You can’t perform that action at this time.
0 commit comments