kubesphere / kubesphere/ks-devops

Github token missing scopes, but there is no feedback to users.

Open
#156 9 comments 0 reactions 1 assignee Claimed by @LinuxSuRen View on GitHub
kind/bug priority/low
Dominant language
Go
Stars
164
Forks
140
PR merge metrics
No merged PRs in 30d

Description

**Describe the Bug**
When creating a DevOps pipeline using in-scm way, I've generated a github token and pasted it into the Token input box, and click `confirm`, then it showed `wrong token`, but there is no why. Only after inspecting server logs, I've found this error message.
```
E0323 10:02:24.731578 1 pipeline.go:637] {
"message" : "Invalid token, its missing scopes: user:email,repo",
"code" : 428,
"errors" : [ ]
}
```

Clearly, I've forget to select the right scopes when generating token. It's better to return this error message back to users.

截屏2021-03-23 10 03 00
截屏2021-03-23 10 02 34

**Versions Used**
KubeSphere: nightly-20210321
Kubernetes: (If KubeSphere installer used, you can skip this)

/kind bug
/priority low
/area devops
/area console

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.