2017-12-18 3 views
1

Github에서 호스팅되는 Maven 프로젝트를 배포하려고합니다. 내가 생성 Github에서 내 공개 키를 추가하고, 또한 내가 필요한 모든 속성과 pom.xml을 채운 생각했다 : 나는 다음과 같이 공개하려고Maven Release Plugin : Permission denied (publickey) Github

<licenses> 
    <license> 
     <name>MIT License</name> 
     <url>http://www.opensource.org/licenses/mit-license.php</url> 
    </license> 
</licenses> 

<developers> 
    <developer> 
     <name>Hristo Vrigazov</name> 
     <email>[email protected]</email> 
     <organization>Hribol</organization> 
     <organizationUrl>https://github.com/hristo-vrigazov</organizationUrl> 
    </developer> 
</developers> 

<scm> 
    <connection>scm:git:git://github.com/hristo-vrigazov/bromium.git</connection> 
    <developerConnection>scm:git:git://github.com/hristo-vrigazov/bromium.git</developerConnection> 
    <url>https://github.com/hristo-vrigazov/bromium</url> 
    <tag>com.hribol.bromium.dsl.parent-1.0.0</tag> 
</scm> 

:

ssh-add ~/.ssh/github_rsa 
ssh-add -l 
mvn release:prepare release:perform -B -e | tee maven-central-deploy.log 

을하지만, Maven에서이 메시지가 계속 표시되는데 내 SSH 키에 문제가 있다는 것을 나타냅니다.

Provider message: 
The git-push command failed. 
Command output: 
Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 


at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:299) 
at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:247) 
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) 
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) 
... 20 more 
Caused by: 
org.apache.maven.shared.release.scm.ReleaseScmCommandException: Unable to tag SCM 
Provider message: 
The git-push command failed. 
Command output: 
Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

어떤 이유가있을 수 있습니까? 스냅 샷을 Nexus에 배포 할 수있었습니다.

<connection>scm:git:ssh://[email protected]/hristo-vrigazov/bromium.git</connection> 

또는

<connection>scm:git:[email protected]:hristo-vrigazov/bromium.git</connection> 

(developerConnection에 대한 동일)
만 :

<connection>scm:git:git://github.com/hristo-vrigazov/bromium.git</connection> 

그것은 SSH를 사용한다 :

답변

관련 문제