【发布时间】:2021-10-18 05:49:11
【问题描述】:
我正在尝试使用 maven-release-plugin:2.5.3。
我在 github 上的存储库正在使用 ssh。推拉效果很好。
在终端输入ssh -T git@github.com 时,我从 github 得到正确答案:
"Hi UserName! You've successfully authenticated, but GitHub does not provide shell access."
在 Eclipse 终端中输入 ./mvnw release:prepare 时,我得到 Build Success。
但在 Eclipse 终端中输入 ./mvnw release:prepare 时,出现以下错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:perform (default-cli) on project ProjectName: Unable to checkout from SCM
[ERROR] Provider message:
[ERROR] The git-clone command failed.
[ERROR] Command output:
[ERROR] Cloning into '/Users/UserName/git/RepoName/ProjectName/target/checkout'...
[ERROR] remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
[ERROR] remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
[ERROR] fatal: unable to access 'https://github.com/UserName/RepoName.git/': The requested URL returned error: 403
我的 POM 如下所示:
<scm>
<developerConnection>scm:git:git@github.com:UserName/RepoName.git</developerConnection>
<tag>HEAD</tag>
</scm>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<goals>install</goals>
<autoVersionSubmodules>true</autoVersionSubmodules>
</configuration>
</plugin>
</plugins>
</build>
我的 ssh 配置文件如下所示:
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
Host github.com
IdentityFile ~/.ssh/github/github_rsa
在 Eclipse Preferences General->Network Connections->SSH2 中,我有以下私钥:
/Users/UserName/.ssh/github/github_rsa,id_dsa,id_rsa
还有 SSH2 主页:
/Users/UserName/.ssh
看起来 GitHub 仍在尝试通过 https 进行连接:但我不知道如何或在哪里。
任何帮助表示赞赏。
【问题讨论】:
-
问题是:
The requested URL returned error: 403...
标签: eclipse maven github ssh version-control