greenkeeperio / greenkeeper-lockfile

:lock: Your lockfile, up to date, all the time
https://greenkeeper.io
183 stars 73 forks source link

Greenkeeper lockfile update fails with permission denied #71

Closed ChristianMurphy closed 6 years ago

ChristianMurphy commented 6 years ago

First, thanks for making an awesome open source product! :sparkling_heart:

I've noticed a quirk on Travis CI where the lockfile package appropriately handles updating the lockfile locally in CI for testing, but is unable to upload the results to generate a lockfile update commit. :thinking:

Is this a misconfiguration from the continuous integration side? Or is this coming from the greenkeeper lockfile side?

Log output

Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
child_process.js:635
    throw err;
    ^
Error: Command failed: git push gk-origin HEAD:greenkeeper/@commitlint/cli-4.0.0
Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
    at checkExecSyncError (child_process.js:592:13)
    at execSync (child_process.js:632:13)
    at Module.upload [as exports] (/home/travis/.nvm/versions/node/v8.6.0/lib/node_modules/greenkeeper-lockfile/upload.js:53:3)
    at Object.<anonymous> (/home/travis/.nvm/versions/node/v8.6.0/lib/node_modules/greenkeeper-lockfile/upload.js:56:37)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)

Travis CI configuration

{
  "language": "node_js",
  "node_js": 8,
  "before_install": [
    "npm i -g npm@5",
    "npm i -g greenkeeper-lockfile@1"
  ],
  "before_script": "greenkeeper-lockfile-update",
  "after_script": "greenkeeper-lockfile-upload",
  "group": "stable",
  "dist": "trusty",
  "os": "linux"
}

full log: https://travis-ci.org/ChristianMurphy/json-schema-keyref/jobs/283327834 pull request: https://github.com/ChristianMurphy/json-schema-keyref/pull/34

ChristianMurphy commented 6 years ago

First create a GitHub access token with push access to your repository and make it available to your CI's environment as GH_TOKEN.