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

Personal Token UnAuthorized

未關閉
#205 6 則留言 0 個 reaction 已指派 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 摘要。