|
@@ -4,11 +4,29 @@ Go 权限系统接入 SDK,供产品端后台接入统一权限系统。
|
|
|
|
|
|
|
|
## 安装
|
|
## 安装
|
|
|
|
|
|
|
|
|
|
+### 1. 配置 Git 认证
|
|
|
|
|
+
|
|
|
|
|
+使用用户名和密码:
|
|
|
|
|
+
|
|
|
|
|
+```bash
|
|
|
|
|
+git config --global url."https://<username>:<password>@code.clickto.dev/".insteadOf "https://code.clickto.dev/"
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+或者通过 credential helper 避免明文密码(第一次 `git pull` 时会提示输入,之后自动记住):
|
|
|
|
|
+
|
|
|
```bash
|
|
```bash
|
|
|
-go env -w GOPRIVATE=code.clickto.dev/*
|
|
|
|
|
-go env -w GONOSUMDB=code.clickto.dev/*
|
|
|
|
|
|
|
+git config --global credential.helper store
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
+### 2. 配置 GOPRIVATE
|
|
|
|
|
+
|
|
|
|
|
+```bash
|
|
|
|
|
+go env -w GOPRIVATE="code.clickto.dev/*"
|
|
|
|
|
+go env -w GONOSUMDB="code.clickto.dev/*"
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+### 3. 安装
|
|
|
|
|
+
|
|
|
```bash
|
|
```bash
|
|
|
go get code.clickto.dev/weiym/permlib@latest
|
|
go get code.clickto.dev/weiym/permlib@latest
|
|
|
```
|
|
```
|