File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ make install
3838
3939``` bash
4040# 设置环境变量(可选)
41- export GITLAB_HOST =https://your-gitlab-instance.com
41+ export GITLAB_URL =https://your-gitlab-instance.com
4242export GITLAB_TOKEN=your-personal-access-token
4343
4444# 创建用户、组和项目
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ make build
1515
1616``` bash
1717# 设置环境变量
18- export GITLAB_HOST =https://gitlab.example.com
18+ export GITLAB_URL =https://gitlab.example.com
1919export GITLAB_TOKEN=glpat-your-token-here
2020```
2121
8383#! /bin/bash
8484
8585# 1. 设置环境变量
86- export GITLAB_HOST =" ${CI_GITLAB_HOST} "
86+ export GITLAB_URL =" ${CI_GITLAB_HOST} "
8787export GITLAB_TOKEN=" ${CI_GITLAB_ADMIN_TOKEN} "
8888
8989# 2. 构建工具
@@ -105,7 +105,7 @@ make build
105105#! /bin/bash
106106
107107# 开发环境配置
108- export GITLAB_HOST =https://dev-gitlab.company.com
108+ export GITLAB_URL =https://dev-gitlab.company.com
109109export GITLAB_TOKEN=$( cat ~ /.gitlab-admin-token)
110110
111111# 构建最新版本
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ go build -o bin/gitlab-cli ./cmd/gitlab-cli
3232### 2. 配置环境变量
3333
3434``` bash
35- export GITLAB_HOST =https://gitlab.example.com
35+ export GITLAB_URL =https://gitlab.example.com
3636export GITLAB_TOKEN=glpat-your-token-here
3737```
3838
@@ -178,7 +178,7 @@ gitlab-cli-sdk/
178178#!/bin/bash
179179
180180# 设置环境变量
181- export GITLAB_HOST ="${CI_GITLAB_HOST}"
181+ export GITLAB_URL ="${CI_GITLAB_HOST}"
182182export GITLAB_TOKEN="${CI_GITLAB_ADMIN_TOKEN}"
183183
184184# 构建工具
Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ type CLIConfig struct {
2020// LoadGitLabCredentials 从环境变量或命令行参数加载 GitLab 凭证
2121func LoadGitLabCredentials (cfg * CLIConfig ) error {
2222 if cfg .GitLabHost == "" {
23- cfg .GitLabHost = os .Getenv ("GITLAB_HOST " )
23+ cfg .GitLabHost = os .Getenv ("GITLAB_URL " )
2424 if cfg .GitLabHost == "" {
25- return fmt .Errorf ("GitLab host is required (use --host or GITLAB_HOST env)" )
25+ return fmt .Errorf ("GitLab host is required (use --host or GITLAB_URL env)" )
2626 }
2727 }
2828 if cfg .GitLabToken == "" {
You can’t perform that action at this time.
0 commit comments