我正在使用jgitflow-maven-plugin
来管理我项目的gitflow流程。我正在使用OAuth令牌将ssh
个网址添加到https
个网址。
但是,当我使用https网址jgitflow-maven-plugin:release-start
时,我会收到以下错误
Caused by: org.eclipse.jgit.api.errors.TransportException: https://<token>@githubserver.com/myorg/myrepo.git: Authentication is required but no CredentialsProvider has been registered
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
at com.atlassian.jgitflow.core.JGitFlowInitCommand.call(JGitFlowInitCommand.java:141)
... 26 more
Caused by: https://<token>@githubserver.com/myorg/myrepo.git: Authentication is required but no CredentialsProvider has been registered
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:498)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:309)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
... 27 more
org.eclipse.jgit.api.errors.TransportException:
https://<token>@githubserver.com/myorg/myrepo.git: Authentication is required but no CredentialsProvider has been registered
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at ...
Caused by: com.atlassian.maven.plugins.jgitflow.exception.MavenJGitFlowException: Error starting release: org.eclipse.jgit.api.errors.TransportException: https://<token>@githubserver.com/myorg/myrepo.git: Authentication is required but no CredentialsProvider has been registered
at com.atlassian.maven.plugins.jgitflow.manager.DefaultFlowReleaseManager.start(DefaultFlowReleaseManager.java:62)
at com.atlassian.maven.plugins.jgitflow.mojo.ReleaseStartMojo.execute(ReleaseStartMojo.java:113)
... 21 more
Caused by: org.eclipse.jgit.errors.TransportException: https://<token>@githubserver.com/myorg/myrepo.git: Authentication is required but no CredentialsProvider has been registered
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:498)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:309)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
... 27 more
看起来jgit
库不支持带有OAuth令牌的HTTP网址。有没有办法绕过它。当我使用ssh urls时,这很好用。