【发布时间】:2016-09-11 19:03:50
【问题描述】:
根据the docs,POSTing 到/oauth/token 与
{
"grant_type" : "password",
"username" : "user@example.com",
"password" : "sekret"
}
应该以类似的方式回应
{
"access_token": "1f0af717251950dbd4d73154fdf0a474a5c5119adad999683f5b450c460726aa",
"token_type": "bearer",
"expires_in": 7200
}
但是,我的 gitlab 服务器似乎决定用 404 回复这个请求:
$ http POST $GITLAB_API_HOST/api/v3/oauth/token grant_type=password username=$GITLAB_USERNAME password=$GITLAB_PASSWORD
HTTP/1.1 404 Not Found
Connection: keep-alive
Content-Length: 36
Content-Type: application/json; charset=utf-8
Date: Mon, 16 May 2016 03:24:16 GMT
Server: nginx
Status: 404 Not Found
X-Request-Id: a6dc1303-f1e8-43a2-8c47-227d5de533c7
X-Runtime: 0.003662
{
"error": "Not Found",
"status": "404"
}
我找不到此流程的工作示例。我需要做些什么来在我的 gitlab (ee) 安装上启用此端点吗?
【问题讨论】:
-
确认这对gitlab.com也不起作用
标签: oauth gitlab gitlab-omnibus