Fix config filename to git_config.env (underscore) and use PASSWORD
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
1. **编辑配置文件**
|
1. **编辑配置文件**
|
||||||
```
|
```
|
||||||
# 编辑 scripts/git-config.env
|
# 编辑 scripts/git_config.env
|
||||||
GIT_USERNAME=你的用户名
|
GIT_USERNAME=你的用户名
|
||||||
GIT_PASSWORD=你的密码
|
GIT_PASSWORD=你的密码
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -36,11 +36,11 @@ EXCLUDE_PATTERNS = ['.git', '.openclaw']
|
|||||||
def load_config():
|
def load_config():
|
||||||
"""从配置文件读取凭证"""
|
"""从配置文件读取凭证"""
|
||||||
script_dir = Path(__file__).parent
|
script_dir = Path(__file__).parent
|
||||||
config_file = script_dir / "git-config.env"
|
config_file = script_dir / "git_config.env"
|
||||||
|
|
||||||
if not config_file.exists():
|
if not config_file.exists():
|
||||||
print(f"错误: 配置文件不存在: {config_file}")
|
print(f"错误: 配置文件不存在: {config_file}")
|
||||||
print("请创建配置文件 git-config.env 并设置 GIT_USERNAME 和 GIT_TOKEN")
|
print("请创建配置文件 git_config.env 并设置 GIT_USERNAME 和 GIT_PASSWORD")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
config = {}
|
config = {}
|
||||||
|
|||||||
@@ -4,6 +4,5 @@
|
|||||||
# Gitea 用户名
|
# Gitea 用户名
|
||||||
GIT_USERNAME=your_username
|
GIT_USERNAME=your_username
|
||||||
|
|
||||||
# Gitea Access Token (推荐) 或密码
|
# Gitea 密码
|
||||||
# 在 Gitea 生成 Token: 用户设置 -> 应用 -> 生成令牌
|
GIT_PASSWORD=your_password
|
||||||
GIT_TOKEN=your_token_or_password
|
|
||||||
|
|||||||
Reference in New Issue
Block a user