diff --git a/controller/github.js b/controller/github.js index 4a3dc68..5ccf2fc 100644 --- a/controller/github.js +++ b/controller/github.js @@ -37,7 +37,12 @@ function getCredentials() { } else { authorizeUser() .then(user => res(user)) - .catch(err => rej(err)); + .catch(err => { + console.error('Error Authorizing user'); + console.error(JSON.stringify(err)); + console.error('************'); + rej(err) + }); } }); } diff --git a/controller/helpers.js b/controller/helpers.js index 89f3c9f..975db27 100644 --- a/controller/helpers.js +++ b/controller/helpers.js @@ -14,6 +14,8 @@ module.exports.getClient = function (client, username) { }; module.exports.createGithubToken = function (username, password, note) { + // Create a Personal Access Token for opspark util https://github.com/settings/tokens + // Check history here: https://github.com/settings/security return `curl -u "${username}:${password}" -d '{"scopes":["public_repo", "repo", "gist"],"note":"${note}","note_url":"https://www.npmjs.com/package/opspark"}' https://api.github.com/authorizations`; };