git-token / cli

GitToken CLI Program
2 stars 0 forks source link

StatusCodeError 502 (Bad Gateway) when registering a token with the GitToken CLI #10

Closed Nikhil22 closed 7 years ago

Nikhil22 commented 7 years ago

After completing the following steps...

? Please enter GitHub username: Nikhil22 ? Please enter GitHub authorization token: [hidden] ? Please select which GitHub organization to register: ulixir ? Please enter desired token name: Ulixir ? Please enter desired token symbol: UXR ? Please enter desired token decimals: 3 ? Please enter admin Ethereum address: 0x42B6AA448b873145B11ECD915c57F118ba382246 ? Please enter admin email: nikhil38@gmail.com

I get this error

{ StatusCodeError: 502 - "<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.10.3 (Ubuntu)</center>\r\n</body>\r\n</html>\r\n" at new StatusCodeError (/Users/nikhilbhaskar/.nvm/versions/node/v6.10.0/lib/node_modules/git-token/node_modules/request-promise-core/lib/errors.js:32:15) at Request.plumbing.callback (/Users/nikhilbhaskar/.nvm/versions/node/v6.10.0/lib/node_modules/git-token/node_modules/request-promise-core/lib/plumbing.js:104:33) at Request.RP$callback [as _callback] (/Users/nikhilbhaskar/.nvm/versions/node/v6.10.0/lib/node_modules/git-token/node_modules/request-promise-core/lib/plumbing.js:46:31) at Request.self.callback (/Users/nikhilbhaskar/.nvm/versions/node/v6.10.0/lib/node_modules/git-token/node_modules/request/request.js:186:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/Users/nikhilbhaskar/.nvm/versions/node/v6.10.0/lib/node_modules/git-token/node_modules/request/request.js:1163:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage.<anonymous> (/Users/nikhilbhaskar/.nvm/versions/node/v6.10.0/lib/node_modules/git-token/node_modules/request/request.js:1085:12) at IncomingMessage.g (events.js:291:16) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) name: 'StatusCodeError', statusCode: 502, message: '502 - "<html>\\r\\n<head><title>502 Bad Gateway</title></head>\\r\\n<body bgcolor=\\"white\\">\\r\\n<center><h1>502 Bad Gateway</h1></center>\\r\\n<hr><center>nginx/1.10.3 (Ubuntu)</center>\\r\\n</body>\\r\\n</html>\\r\\n"', error: '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor="white">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.10.3 (Ubuntu)</center>\r\n</body>\r\n</html>\r\n', options: { uri: 'https://registry.gittoken.io', method: 'POST', body: { github_token: 'REDACTED', admin_username: 'Nikhil22', admin_address: '0x42B6AA448b873145B11ECD915c57F118ba382246', admin_email: 'nikhil38@gmail.com', organization: 'ulixir', name: 'Ulixir', symbol: 'UXR', decimals: '3' }, json: true, callback: [Function: RP$callback], transform: undefined, simple: true, resolveWithFullResponse: false, transform2xxOnly: false }, response: IncomingMessage { _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: [Object], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: true, endEmitted: true, reading: false, sync: true, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, defaultEncoding: 'utf8', ranOut: false, awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: false, domain: null, _events: { end: [Object], close: [Object], data: [Function], error: [Function] }, _eventsCount: 4, _maxListeners: undefined, socket: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: null, npnProtocol: false, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object], _eventsCount: 9, connecting: false, _hadError: false, _handle: null, _parent: null, _host: 'registry.gittoken.io', _readableState: [Object], readable: false, domain: null, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, destroyed: true, _bytesDispatched: 398, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: null, _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Object], read: [Function], _consuming: true, _idleNext: null, _idlePrev: null, _idleTimeout: -1 }, connection: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: null, npnProtocol: false, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object], _eventsCount: 9, connecting: false, _hadError: false, _handle: null, _parent: null, _host: 'registry.gittoken.io', _readableState: [Object], readable: false, domain: null, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, destroyed: true, _bytesDispatched: 398, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: null, _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Object], read: [Function], _consuming: true, _idleNext: null, _idlePrev: null, _idleTimeout: -1 }, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: { server: 'nginx/1.10.3 (Ubuntu)', date: 'Sat, 30 Sep 2017 16:50:06 GMT', 'content-type': 'text/html', 'content-length': '182', connection: 'close' }, rawHeaders: [ 'Server', 'nginx/1.10.3 (Ubuntu)', 'Date', 'Sat, 30 Sep 2017 16:50:06 GMT', 'Content-Type', 'text/html', 'Content-Length', '182', 'Connection', 'close' ], trailers: {}, rawTrailers: [], upgrade: false, url: '', method: null, statusCode: 502, statusMessage: 'Bad Gateway', client: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: null, npnProtocol: false, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object], _eventsCount: 9, connecting: false, _hadError: false, _handle: null, _parent: null, _host: 'registry.gittoken.io', _readableState: [Object], readable: false, domain: null, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, destroyed: true, _bytesDispatched: 398, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: null, _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Object], read: [Function], _consuming: true, _idleNext: null, _idlePrev: null, _idleTimeout: -1 }, _consuming: true, _dumped: false, req: ClientRequest { domain: null, _events: [Object], _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, upgrading: false, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedHeader: [Object], _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Object], connection: [Object], _header: 'POST / HTTP/1.1\r\nhost: registry.gittoken.io\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 253\r\nConnection: close\r\n\r\n', _headers: [Object], _headerNames: [Object], _onPendingData: null, agent: [Object], socketPath: undefined, timeout: undefined, method: 'POST', path: '/', _ended: true, parser: null, res: [Circular] }, request: Request { domain: null, _events: [Object], _eventsCount: 5, _maxListeners: undefined, uri: [Object], method: 'POST', body: '{"github_token":"REDACTED","admin_username":"Nikhil22","admin_address":"0x42B6AA448b873145B11ECD915c57F118ba382246","admin_email":"nikhil38@gmail.com","organization":"ulixir","name":"Ulixir","symbol":"UXR","decimals":"3"}', readable: true, writable: true, explicitMethod: true, _qs: [Object], _auth: [Object], _oauth: [Object], _multipart: [Object], _redirect: [Object], _tunnel: [Object], _rp_resolve: [Function], _rp_reject: [Function], _rp_promise: [Object], _rp_callbackOrig: undefined, callback: [Function], _rp_options: [Object], headers: [Object], setHeader: [Function], hasHeader: [Function], getHeader: [Function], removeHeader: [Function], localAddress: undefined, pool: {}, dests: [], __isRequestRequest: true, _callback: [Function: RP$callback], proxy: null, tunnel: true, setHost: true, originalCookieHeader: undefined, _disableCookies: true, _jar: undefined, port: 443, host: 'registry.gittoken.io', path: '/', _json: true, httpModule: [Object], agentClass: [Object], agent: [Object], _started: true, href: 'https://registry.gittoken.io/', req: [Object], ntick: true, response: [Circular], originalHost: 'registry.gittoken.io', originalHostHeaderName: 'host', responseContent: [Circular], _destdata: true, _ended: true, _callbackCalled: true }, toJSON: [Function: responseToJSON], caseless: Caseless { dict: [Object] }, read: [Function], body: '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor="white">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.10.3 (Ubuntu)</center>\r\n</body>\r\n</html>\r\n' } }

Ryanmtate commented 7 years ago

Oh no! Thanks for the alert @Nikhil22

I just restarted the Docker containers. Looking into why the containers exited!

Ryanmtate commented 7 years ago

Also @Nikhil22

Please issue a new a new GitHub Token and delete the token you have used here. It is best to review the body before pasting the content to ensure non-sensitive information is not posted.

Ryanmtate commented 7 years ago

I've updated the above comment and redacted the GitHub token. However, I still encourage you to issue a new one for safety!

Nikhil22 commented 7 years ago

Ahh totally didn't think before I posted that haha

Ryanmtate commented 7 years ago

No worries! Thanks for registering!