kubesphere / kubesphere/ks-devops
Github token missing scopes, but there is no feedback to users.
- 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.

**Versions Used**
KubeSphere: nightly-20210321
Kubernetes: (If KubeSphere installer used, you can skip this)
/kind bug
/priority low
/area devops
/area console
Contributor guide
Assessment
This issue has not been assessed yet.