Permission denied when publishing a package after cloning it with SSH


#1

I cloned a test repository from GitHub using the HTTPS link (https://github.com/username/my-atom-test-package.git) and no issues publishing my atom package. I repeated exactly the same process cloning the repository using the SSH link (git@github.com:username//my-atom-test-package.git) and all the process goes right until the moment in which I run apm publish minor.

Here the detailed step by step:

  1. Clone the repo:
    1.a HTTPS: git clone https://github.com/username/my-atom-test-package.git
    1.b SSH: git clone git@github.com:/username/my-atom-test-package.git
  2. Initialize atom package: apm init -p my-atom-test-package
  3. Edit package.json and replace "repository": "https://github.com/atom/atom-test-package", for:
    3.a HTTPS:
"repository": {
  "type": "git",
  "url": "git+https://github.com/username/my-atom-test-package.git"
},

3.b SSH:

"repository": {
  "type": "git",
  "url": "git+https://github.com/username/my-atom-test-package.git"
}
  1. Commit changes and push.
  2. Run apm login, copy and paste the token.
  3. apm publish minor and…
    6.a HTTPS: congratulations! blablabla…
    6.b SSH:
$ apm publish minor
Registering my-atom-test-package done
Preparing and tagging a new version done
Pushing v0.1.0 tag failed
Permission denied (publickey).
fatal: Could not read from remote repository.

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

What am I missing?