xzheng opened 1 year ago
|
|||||
xzheng changed title 1 year ago
|
|||||
Robin Shen changed title 1 year ago
|
|||||
Changed title to English so that it is understandable by all users. |
|||||
Robin Shen changed title 1 year ago
|
|||||
@hopzheng 试了下可以连接到gitlab.com,也许你的gitlab版本太低? |
|||||
OneDev changed state to 'Closed' 1 year ago
|
|||||
State changed as code fixing the issue is committed (561a2924) |
|||||
Referenced from commit 1 year ago
|
|||||
感谢@robin,我查了下线上最新的文档,的确是有这个支持。我们这边的gitlab版本太低 |
|||||
OneDev changed state to 'Released' 1 year ago
|
|||||
State changed as build #3505 is successful |
|||||
@hopzheng 为了兼容老版本,8.0.10 使用了 PRIVATE-TOKEN。 |
|||||
@robin 真是太给力了,我还在想怎么给项目组沟通升级呢,作者一下子就升级兼容了,真的非常感谢你的帮助。 我也会给周围的朋友们多多宣传你这个项目的。 |
|||||
感谢,🙏 |
|||||
@robin 我测试了最新版本的代码,发现没有改善,看了下源码,发现 package io.onedev.server.plugin.imports.gitlab.ImportServer.java文件中 第739行,isValid方法还是沿用原来的头部设置,导致校验这儿的方法还是走老路子 |
|||||
疏忽了,😓 在 8.0.11里改好了。 |
Type |
Bug
|
Priority |
Normal
|
Assignee | |
Affected Versions |
8.0.9
|
Issue Votes (0)
1.要求填入的是 GitLab Personal Access Token。
2.再尝试多次无法成功后
3.通过工具抓包发现
4.是把个人的Access Token作为OAuth2 token来填写了。
5.gitlab的帮助文档中有如下说明:
OAuth2 tokens You can use an OAuth2 token to authenticate with the API by passing it in either the access_token parameter or the Authorization header. Example of using the OAuth2 token in a parameter: curl https://gitlab.example.com/api/v4/projects?access_token=OAUTH-TOKEN Example of using the OAuth2 token in a header: curl --header "Authorization: Bearer OAUTH-TOKEN" https://gitlab.example.com/api/v4/projects Read more about GitLab as an OAuth2 provider.
Personal access tokens You can use a personal access token to authenticate with the API by passing it in either the private_token parameter or the Private-Token header. Example of using the personal access token in a parameter: curl https://gitlab.example.com/api/v4/projects?private_token=<your_access_token> Example of using the personal access token in a header: curl --header "Private-Token: <your_access_token>" https://gitlab.example.com/api/v4/projects Read more about personal access tokens.