SAP-archive / techne

Design Guidelines, Components and Patterns Library for modern, mobile-first, user-centric Experience Design
https://techne.yaas.io
Apache License 2.0
40 stars 26 forks source link

Ops: gulp deploy failling #1204

Closed saad-mo closed 6 years ago

saad-mo commented 7 years ago

there seems to be an error with gulp deploy. the travis plan finishes, but the latest site is not deployed. copied the error message from the log below.

------- error from the log -------

$ gulp deploy [19:56:48] Using gulpfile ~/build/SAP/techne/gulpfile.js [19:56:48] Starting 'deploy'... [19:56:48] Starting 'prepareDeploy'... [19:56:48] Finished 'prepareDeploy' after 31 ms [19:56:48] Starting 'ghDeploy'... [19:56:48] 'ghDeploy' errored after 199 ms [19:56:48] Error in plugin 'gulp-gh-pages' Message: Command failed: git clone git@github.com:SAP/techne.git .publish Cloning into '.publish'... 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.

Details: killed: false code: 128 signal: null cmd: git clone git@github.com:SAP/techne.git .publish [19:56:48] 'deploy' errored after 235 ms [19:56:48] Error in plugin 'gulp-gh-pages' Message: Command failed: git clone git@github.com:SAP/techne.git .publish Cloning into '.publish'... 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.

derberg commented 7 years ago

the https://github.com/SAP/techne/settings/keys is missing, this is why that happened. You know if somebody removed it for a reason? I can configure everything again but first we need to be sure nobody else is going to remove it

saad-mo commented 7 years ago

hmmm, i do not recall ever venturing in those settings... the only other two admins are @xak and @joseegm. not sure if they have any insight into this.

derberg commented 7 years ago

when I look closer on the log, it sounds like it is actually a problem with pulling, not pushing, which is weird. The gh plugin clones techne into .publish folder. Try to modify travis config and run gulp gh with sudo?

saad-mo commented 7 years ago

tried with sudo, but it does not recognize the sudo command. --- log --- $ sudo gulp deploy sudo: gulp: command not found

derberg commented 7 years ago

documentation says you need to add sudo: required to the travis.yaml https://docs.travis-ci.com/user/reference/overview/

saad-mo commented 7 years ago

tried with sudo. still no luck. I think we need that deployment key after all.

saad-mo commented 7 years ago

@derberg what are the next steps? people are getting anxious as we haven't built the latest site in a week.

derberg commented 7 years ago

Performed several checks today Looks like dependency to gulp-gh-pages called gift required update due to new git version. It makes sense cause new 2.14 git version was released on the day when build stopped working. Travis uses 2.14. I manually upgraded to 2.15 but it didn't work. I managed to change to 2.13.5 and still no success. I'm puzzled

derberg commented 7 years ago

For now looks like we are blocked until this pull request is merged https://github.com/shinnn/gulp-gh-pages/pull/117 and new release is available

derberg commented 7 years ago

trying quickly alternative https://github.com/tschaub/gh-pages

derberg commented 7 years ago

locally work pretty good https://github.com/SAP/techne/commits/gh-pages changing node to 8 to see if this will work on travis too

derberg commented 7 years ago

gh-pages also has cloning issues

ghDeploy failes { Error
    at ChildProcess.<anonymous> (/home/travis/build/SAP/techne/node_modules/gh-pages/lib/git.js:42:16)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:927:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
  code: 128,
  message: 'remote: Invalid username or password.\nfatal: Authentication failed for \'https://github.com/SAP/techne.git/\'\n',
  name: 'ProcessError' }

what is going on here

derberg commented 7 years ago

going back to my initial suspicion that issues are caused by removed deploy keys

derberg commented 7 years ago

@saadmhybris ok, unfortunately I was right that somebody removed the deploy key. I recreated the ssh keys and all works now. I also switched to different gh-pages plugin as the other one stopped working anyway. Please make some minor change and confirm that pipeline works again.

Sorry for such amount of commits, I did not expect that I will spend the whole day working on that issue.

saad-mo commented 7 years ago

@derberg - everything seems to be working as expected, thank you! I'll keep this ticket open for a day or two just to make sure no other issues pop up.

what is the process of adding deploy key in case it disappears again?

derberg commented 7 years ago

I described the process some time ago here https://github.com/YaaS/docpad-skeleton-apidocs/blob/master/docs/automation.md#install-the-travis-cli-tool-for-key-generation and also recorded a video some time ago https://youtu.be/Vw_wNv1lMVA?t=513 It is about different project of course, but process is obviously the same

xak commented 6 years ago

@saadmhybris Was this fixed?

saad-mo commented 6 years ago

yep. closing.