1

I have the following configuration in Maven:

<scm>
    <connection>scm:git:ssh://git@my-repo.com:7999/my-project.git</connection>
    <developerConnection>scm:git:ssh://git@my-repo.com:7999/wrap/my-project.git</developerConnection>
    <tag>HEAD</tag>
</scm>

My SSH key that I am sharing with the Bitbucket server is in:

C:\Users\my-user\.ssh\

Where I have two files: id_rsa and id_rsa.pub.

I'm not sure if Maven sees my SSH configuration, because when preparing a release, I get:

Unable to tag SCM
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] Permission denied (publickey).
[ERROR] fatal: Could not read from remote repository.

How could I test that the Maven configuration does see my server key from id_rsa.pub?

octavian
  • 15,986
  • 38
  • 119
  • 229
  • Have you tried doing it from the command line? Did it work, can you share the output? – Adonis Mar 17 '17 at 13:41
  • If I try `git pull` from the command line, I am asked for my password 3 times(which is strange since an `ssh` connection should't ask for a password, from what I understand). Then, I get `Fatal: could not read from remote repository`. – octavian Mar 17 '17 at 13:48
  • I see you are using Windows, do you use Git bash? If so, is this link helpful: http://stackoverflow.com/a/9011152/4121573 – Adonis Mar 17 '17 at 14:09
  • This link may be useful: http://stackoverflow.com/questions/11093358/git-and-ssh-which-key-is-used – htulsiani Mar 17 '17 at 14:56

0 Answers0