[
https://issues.apache.org/jira/browse/SCM-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17567615#comment-17567615
]
ASF GitHub Bot commented on SCM-945:
------------------------------------
michael-o commented on code in PR #153:
URL: https://github.com/apache/maven-scm/pull/153#discussion_r922820137
##########
maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/PlexusInteractivityCredentialsProvider.java:
##########
@@ -0,0 +1,101 @@
+package org.apache.maven.scm.provider.git.jgit.command;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+import java.util.Arrays;
+
+import org.codehaus.plexus.components.interactivity.Prompter;
+import org.codehaus.plexus.components.interactivity.PrompterException;
+import org.eclipse.jgit.errors.UnsupportedCredentialItem;
+import org.eclipse.jgit.transport.CredentialItem;
+import org.eclipse.jgit.transport.CredentialsProvider;
+import org.eclipse.jgit.transport.URIish;
+
+/**
+ * {@link CredentialsProvider} leveraging the {@link Prompter} component.
+ *
+ */
+public class PlexusInteractivityCredentialsProvider extends CredentialsProvider
+{
+ private final boolean isInteractive;
Review Comment:
The only option I can think of is that a setter on the provider being
interactive by default and the caller sets to false. E.g., Maven Release can
piggy back this. WDYT?
> Support OpenSSH private keys with maven-scm-provider-jgit
> ---------------------------------------------------------
>
> Key: SCM-945
> URL: https://issues.apache.org/jira/browse/SCM-945
> Project: Maven SCM
> Issue Type: Bug
> Components: maven-scm-provider-jgit
> Affects Versions: 1.11.2
> Reporter: Konrad Windszus
> Assignee: Michael Osipov
> Priority: Major
>
> For SSH based authentication with private keys in the OpenSSH format the
> following error is being emitted: {{invalid privatekey: ...}}
> This is due to the use of JGit 4.5.4
> (https://github.com/apache/maven-scm/blob/c5eb2c187568809e0dc0ea9ac83031f1dcb5ad1a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/pom.xml#L53)
> which used JSch which lacks support for those private keys. JGit 5.2 comes
> with a new SSH implementation
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=520927) and should by that
> also support OpenSSH private keys.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)