当我尝试使用个人访问令牌创建401 bad credentials
API问题时
它以POST https://api.github.com/repos/mh-cbon/demotest/issues: 401 Bad credentials []
错误响应:
input := &github.IssueRequest{
Title: &g.IssueTitle,
Body: &body,
}
ts := oauth2.StaticTokenSource(
&oauth2.Token{AccessToken: g.Token},
)
tc := oauth2.NewClient(oauth2.NoContext, ts)
client := github.NewClient(tc)
_, _, err = client.Issues.Create(g.Owner, g.Repo, input)
我使用以下代码:
g.Token
repo
repo:status
repo:repo_deployment
repo:public_repo
user
user:email
user:follow
是我使用以下权限创建的令牌的值:
{{1}}