Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Permission to USER/PROJECT.git denied to deploy key #20

Open
laugimethods opened this issue Jun 8, 2016 · 0 comments
Open

ERROR: Permission to USER/PROJECT.git denied to deploy key #20

laugimethods opened this issue Jun 8, 2016 · 0 comments

Comments

@laugimethods
Copy link

laugimethods commented Jun 8, 2016

I try to deploy (on Wercker hosted mode) generated ScalaDoc files into github/gh-pages using the following Wercker script:

box: hseeberger/scala-sbt
build:
  steps:
    - script:
        name: compile
        code: |
          sbt clean compile test
    - install-packages:
        packages: git openssh-client
    - add-to-known_hosts:
        # https://github.com/wercker/step-add-to-known_hosts
        hostname: github.com
        fingerprint: 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
        type: rsa
    - add-ssh-key:
        # http://devcenter.wercker.com/docs/ssh-keys/generating-ssh-keys.html
        # https://github.com/Logimethods/nats-connector-gatling/settings/keys
        # http://devcenter.wercker.com/docs/git/submodules.html
        keyname: GITHUB_SSH_KEY
        host: github.com
    - script:
        name: Configure Git
        code: |-
          git config --global push.default matching
          git config --global user.email "$GITHUB_EMAIL"
          git config --global user.name "$GITHUB_USERNAME"
          # https://help.github.com/articles/error-permission-denied-publickey/#platform-all
          # ssh -vT [email protected]
    - script:
        name: scaladoc
        code: |
          sbt ghpagesPushSite

The build does not succeed due to an "ERROR: Permission to logimethods/nats-connector-gatling.git denied to deploy key" error (which is btw not listed in GitHub SSH Help Page):

export WERCKER_STEP_ROOT="/pipeline/script-3f6ed31b-cb8b-4c56-9cbd-81b4d633f35f"
export WERCKER_STEP_ID="script-3f6ed31b-cb8b-4c56-9cbd-81b4d633f35f"
export WERCKER_STEP_OWNER="wercker"
export WERCKER_STEP_NAME="script"
export WERCKER_REPORT_NUMBERS_FILE="/report/script-3f6ed31b-cb8b-4c56-9cbd-81b4d633f35f/numbers.ini"
export WERCKER_REPORT_MESSAGE_FILE="/report/script-3f6ed31b-cb8b-4c56-9cbd-81b4d633f35f/message.txt"
export WERCKER_REPORT_ARTIFACTS_DIR="/report/script-3f6ed31b-cb8b-4c56-9cbd-81b4d633f35f/artifacts"
source "/pipeline/script-3f6ed31b-cb8b-4c56-9cbd-81b4d633f35f/run.sh" < /dev/null
[info] Loading project definition from /pipeline/source/project
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[info] Set current project to nats-connector-gatling (in build file:/pipeline/source/)
[info] Main Scala API documentation to /pipeline/source/target/scala-2.11/api...
[info] Cloning into '.'...
[info] Warning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hosts.
model contains 11 documentable templates
[info] Main Scala API documentation successful.
[info] rm 'index.html'
[info] rm 'params.json'
[info] rm 'stylesheets/github-light.css'
[info] rm 'stylesheets/normalize.css'
[info] rm 'stylesheets/stylesheet.css'
[info] [gh-pages b03abaa] updated site
[info]  96 files changed, 12085 insertions(+), 856 deletions(-)
[info]  create mode 100644 .nojekyll
[info]  delete mode 100644 index.html
[info]  create mode 100644 latest/api/akka/package.html
...
[info]  create mode 100644 latest/api/lib/valuemembersbg.gif
[info]  create mode 100644 latest/api/package.html
[info]  delete mode 100644 params.json
[info]  delete mode 100644 stylesheets/github-light.css
[info]  delete mode 100644 stylesheets/normalize.css
[info]  delete mode 100644 stylesheets/stylesheet.css
[error] Warning: Permanently added the RSA host key for IP address '192.30.252.128' to the list of known hosts.
[error] ERROR: Permission to logimethods/nats-connector-gatling.git denied to deploy key
[error] fatal: Could not read from remote repository.
[error] 
[error] Please make sure you have the correct access rights
[error] and the repository exists.
java.lang.RuntimeException: Nonzero exit code (128) running git.
    at scala.sys.package$.error(package.scala:27)
    at scala.Predef$.error(Predef.scala:142)
    at com.typesafe.sbt.git.ConsoleGitRunner$.apply(ConsoleGitRunner.scala:30)
    at com.typesafe.sbt.git.GitRunner$class.push(GitRunner.scala:19)
    at com.typesafe.sbt.git.ConsoleGitRunner$.push(ConsoleGitRunner.scala:7)
    at com.typesafe.sbt.git.GitRunner$class.commitAndPush(GitRunner.scala:16)
    at com.typesafe.sbt.git.ConsoleGitRunner$.commitAndPush(ConsoleGitRunner.scala:7)
    at com.typesafe.sbt.SbtGhPages$ghpages$$anonfun$pushSite0$1.apply(SbtGhPages.scala:71)
    at com.typesafe.sbt.SbtGhPages$ghpages$$anonfun$pushSite0$1.apply(SbtGhPages.scala:71)
    at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:35)
    at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:34)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
[error] (*:ghpagesPushSite) Nonzero exit code (128) running git.

Did anyone succeeded in doing so?
The SSH key is apparently recognized (see bellow), so it might be due to some Wercker behaviour that restrains the mechanism used by Git to push the data (Wercker Issue #231), or an issue of the gh-pages plugin (which is why I submit this current issue).


FYI, "ssh -vT [email protected]" generates such output:

export WERCKER_STEP_ROOT="/pipeline/script-a8216232-41c2-4c56-a1d6-ec4314237e3d"
export WERCKER_STEP_ID="script-a8216232-41c2-4c56-a1d6-ec4314237e3d"
export WERCKER_STEP_OWNER="wercker"
export WERCKER_STEP_NAME="script"
export WERCKER_REPORT_NUMBERS_FILE="/report/script-a8216232-41c2-4c56-a1d6-ec4314237e3d/numbers.ini"
export WERCKER_REPORT_MESSAGE_FILE="/report/script-a8216232-41c2-4c56-a1d6-ec4314237e3d/message.txt"
export WERCKER_REPORT_ARTIFACTS_DIR="/report/script-a8216232-41c2-4c56-a1d6-ec4314237e3d/artifacts"
source "/pipeline/script-a8216232-41c2-4c56-a1d6-ec4314237e3d/run.sh" < /dev/null
OpenSSH_6.7p1 Debian-5+deb8u2, OpenSSL 1.0.1k 8 Jan 2015
debug1: Reading configuration data /root/.ssh/config
debug1: /root/.ssh/config line 1: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to github.com [192.30.252.128] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: key_load_public: No such file or directory
debug1: identity file /tmp/tmp.PneWvUGLNE type -1
debug1: key_load_public: No such file or directory
debug1: identity file /tmp/tmp.PneWvUGLNE-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u2
debug1: Remote protocol version 2.0, remote software version libssh-0.7.0
debug1: no match: libssh-0.7.0
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha2-256 none
debug1: kex: client->server aes128-ctr hmac-sha2-256 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: RSA 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /etc/ssh/ssh_known_hosts:1
Warning: Permanently added the RSA host key for IP address '192.30.252.128' to the list of known hosts.
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /tmp/tmp.PneWvUGLNE
debug1: Authentication succeeded (publickey).
Authenticated to github.com ([192.30.252.128]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = C.UTF-8
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Hi Logimethods/nats-connector-gatling! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: fd 2 clearing O_NONBLOCK
Transferred: sent 2944, received 1512 bytes, in 0.0 seconds
Bytes per second: sent 70432.6, received 36173.3
debug1: Exit status 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant