无法提交文件-Maven和IntelliJ

时间:2018-09-26 14:52:52

标签: java spring maven intellij-idea

输入时出现此错误

MVN发布:准备

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release- 
 plugin:2.5.3:prepare (default-cli) on project sfg-pet-clinic: Unable 
 to commit files
 [ERROR] Provider message:
 [ERROR] The git-push command failed.
 [ERROR] Command output:
 [ERROR] git@github.com: Permission denied (publickey).
 [ERROR] fatal: Could not read from remote repository.
 [ERROR] 
 [ERROR] Please make sure you have the correct access rights
 [ERROR] and the repository exists.
 [ERROR] 
 [ERROR] -> [Help 1]

我的pom.xml文件是:

<?xml version="1.0" encoding="UTF-8"?>
                <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
                    <modelVersion>4.0.0</modelVersion>

                    <groupId>theo.tziomakas</groupId>
                    <artifactId>sfg-pet-clinic</artifactId>
                    <version>0.0.4</version>
                    <modules>
                        <module>pet-clinic-data</module>
                        <module>pet-clinic-web</module>
                    </modules>
                    <packaging>pom</packaging>

                    <name>sfg-pet-clinic</name>
                    <description>Demo project for Spring Boot</description>

                    <parent>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-parent</artifactId>
                        <version>2.0.5.RELEASE</version>
                        <relativePath /> <!-- lookup parent from repository -->
                    </parent>

                    <properties>
                        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
                        <java.version>1.8</java.version>
                    </properties>



                    <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>
                                <configuration>
                                    <goals>install</goals>
                                    <autoVersionSubmodules>true</autoVersionSubmodules>
                                    <checkModificationExcludes>
                                        <checkModificationExclude>pom.xml</checkModificationExclude>
                                        <checkModificationExclude>**</checkModificationExclude>
                                    </checkModificationExcludes>
                                </configuration>
                            </plugin>
                        </plugins>
                    </build>

                    <scm>
                        <developerConnection>scm:git:git@github.com:theo82/Pet-Clinic.git</developerConnection>
                      <tag>sfg-pet-clinic-0.0.4</tag>
                    </scm>
                    <!--mvn versions:set -DnewVersion=1.0.4-SNAPSHOT-->


                </project>

此行会导致我认为的错误

<developerConnection>scm:git:git@github.com:theo82/Pet- 
Clinic.git</developerConnection>

我该如何解决?

0 个答案:

没有答案