github-tools / github-tools/github-release-notes

Personal Token UnAuthorized

オープン
#205 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
897
フォーク
313
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi,

My issue is pretty basic.. My github token is apparently not valid, however it's configured with all the github permissions.

When I'm trying:

gren release --token=[your token]

I'm getting:

- Generate release notes:
===================================
- Getting the list of releases{ Error: 401 error making request GET https://api.github.com/repos/DIaaS/email-test/releases: "Unauthorized"
at new ResponseError (C:\Users\aechevarriaf.EAD\AppData\Roaming\npm\node_modules\github-release-notes\node_modules\github-api\dist\components\Requestable.js:50:118)
at handler (C:\Users\aechevarriaf.EAD\AppData\Roaming\npm\node_modules\github-release-notes\node_modules\github-api\dist\components\Requestable.js:373:18)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
path: '/repos/DIaaS/email-test/releases',
request:
{ adapter: [Function: httpAdapter],
transformRequest: { '0': [Function: transformRequest] },
transformResponse: { '0': [Function: transformResponse] },
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus],
headers:
{ Accept: 'application/vnd.github.v3+json',
'Content-Type': 'application/json;charset=UTF-8',
Authorization: 'token 23356ad424706f30253f4cd53f9f311189b456cc',
'User-Agent': 'axios/0.15.3' },
method: 'GET',
url: 'https://api.github.com/repos/DIaaS/email-test/releases',
params: { per_page: 30, page: 1 },
data: undefined,
responseType: 'json' },
response:
{ status: 401,
statusText: 'Unauthorized',
headers:
{ server: 'GitHub.com',
date: 'Fri, 12 Apr 2019 08:24:20 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '83',
connection: 'close',
status: '401 Unauthorized',
'x-github-media-type': 'github.v3; format=json',
'x-ratelimit-limit': '60',
'x-ratelimit-remaining': '59',
'x-ratelimit-reset': '1555061060',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type',
'access-control-allow-origin': '*',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'x-frame-options': 'deny',
'x-content-type-options': 'nosniff',
'x-xss-protection': '1; mode=block',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
'content-security-policy': 'default-src \'none\'',
'x-github-request-id': 'E4C3:260E:2A7057:567A6C:5CB04B34' },
config:
{ adapter: [Function: httpAdapter],
transformRequest: [Object],
transformResponse: [Object],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus],
headers: [Object],
method: 'GET',
url: 'https://api.github.com/repos/DIaaS/email-test/releases',
params: [Object],
data: undefined,
responseType: 'json' },
request:
Writable {
_writableState: [Object],
writable: true,
domain: null,
_events: [Object],
_eventsCount: 2,
_maxListeners: undefined,
_options: [Object],
_redirectCount: 0,
_onNativeResponse: [Function],
_currentRequest: [Object],
_currentUrl: 'https://api.github.com' },
data:
{ message: 'Bad credentials',
documentation_url: 'https://developer.github.com/v3' } },
status: undefined }

am I missing something? Appreciate the help

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start by reproducing the reported `gren release --token=[your token]` command and checking the token handling for the `GET /repos/DIaaS/email-test/releases` request. The report gives no file or test entry point; done means identifying why the request returns 401 and addressing that behavior or clearly reporting the cause.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github, javascript, node.js
領域
api, authentication, cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。