Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OAuth管理.md #969

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions doc/zh/guide/后台管理/OAuth管理.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,23 @@
::: tip
配置OAuth应用时,回调地址栏需填入当前TCA平台配置的域名或IP地址(如当前页面非80端口,需要显式指定端口号),作为Git平台上OAuth应用的回调地址。
:::

## Gitlab使用步骤

> 需要设置 --env GITLAB_OAUTH_URL=http://host/oauth/authorize --env GITLAB_URL=http://host --env HTTPS_CLONE_FLAG=false
>
> docker启动的时候增加--env 其它方式启动类似设置环境变量
>
> HTTPS_CLONE_FLAG=false 参数TCA默认设置true,如果需要开启http而非https,则需要设置此参数

### 第一步:创建Application
* 私有化部署Gitlab Preferences找到Application
* 创建Application,选择授权scope,只需要api权限
* 填入Callback URL,此URL在TCA超级管理员页面复制`http://host/cb_git_auth/tgitsaas`
* 保存,并且复制 ApplicationID(clientId) Secret

## 第二步:设置TCA OAuth配置
* 如上Gitlab设置的图片,填入即可

## 第三步:完成授权
* TCA凭证管理,点击授权按钮,会弹出对应的授权页,授权完成即可