Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
R
rentos
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
accounting
rentos
Commits
6538a8b7
Commit
6538a8b7
authored
Oct 13, 2026
by
wenwen.tang
😕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: 补齐凭据锁问题根因与本地修复方式
parent
66561978
Pipeline
#833
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
2026-10-13.md
.workbuddy/memory/2026-10-13.md
+15
-3
MEMORY.md
.workbuddy/memory/MEMORY.md
+3
-0
No files found.
.workbuddy/memory/2026-10-13.md
View file @
6538a8b7
...
@@ -32,11 +32,23 @@
...
@@ -32,11 +32,23 @@
- 验证:索引 LF / 工作区 CRLF 时 `
git status
` 依然干净(走归一化比较),**不会产生假 diff** ——
- 验证:索引 LF / 工作区 CRLF 时 `
git status
` 依然干净(走归一化比较),**不会产生假 diff** ——
这点很关键,因为台账会被程序频繁写入
这点很关键,因为台账会被程序频繁写入
### 一个副作用修复
### 一个副作用修复
(根因已定位)
- `
git push -u
` 报 `
could not lock config file …/PortableGit/etc/gitconfig: File exists
`
- `
git push -u
` 报 `
could not lock config file …/PortableGit/etc/gitconfig: File exists
`
- 定位:`
etc/gitconfig.lock
` 是 0 字节残留锁(时间戳正好是推送那一刻);确认无进程持有后清除,
- 现象:**只要需要向服务器认证就复现**;空 push(`
Everything up-to-date
`)不报错
`
git fetch
` 恢复正常。**该锁会持续干扰后续所有写系统配置的 git 操作**
- 根因:本机 git 的 **系统级 `
credential.helper=helper-selector
`**(WorkBuddy 定制选择器)。
它在认证成功后要去写系统 `
gitconfig
` 记录所选 helper,写入失败却留下 0 字节 `
gitconfig.lock
`,
并**持续干扰**后续所有写系统配置的 git 操作
- 它还会顺带改写 `
~/.gitconfig
`:把 `
credential.helper=store
` 换成 `
git-credential-wincred.exe
`
并追加 `
[
credential "helperselector"
]
selected =
<no
helper
>
` —— 属其正常机制,未损坏配置
- **修复(已生效)**:在**仓库本地**重置凭据链,绕过选择器
```bash
git config --local credential.helper "" # 空值 = 清空此前累加的 helper 链
git config --local --add credential.helper store
```
验证:`
git ls-remote
`(需认证)正常且 **`
gitconfig.lock
` 不再生成** ✓
- 该设置只落在 `
.git/config
`,不影响其他项目,也不动系统/全局配置
- 若将来 store 凭据失效需重新认证:`
git config --local --unset-all credential.helper
` 即可还原
### 完整性验证(clone 回环)
### 完整性验证(clone 回环)
...
...
.workbuddy/memory/MEMORY.md
View file @
6538a8b7
...
@@ -209,6 +209,9 @@
...
@@ -209,6 +209,9 @@
`.gitattributes`
优先级高于 autocrlf,故跨机行为一致
`.gitattributes`
优先级高于 autocrlf,故跨机行为一致
-
**Dockerfile 必须 LF**
—— 续行符
`\` 带 `
\r
` 会让 Linux 构建解析错误
-
**Dockerfile 必须 LF**
—— 续行符
`\` 带 `
\r
` 会让 Linux 构建解析错误
- 台账索引 LF / 工作区 CRLF,靠归一化保证 `
git status
` 干净,**不会假 diff**(程序频繁写台账也不受影响)
- 台账索引 LF / 工作区 CRLF,靠归一化保证 `
git status
` 干净,**不会假 diff**(程序频繁写台账也不受影响)
- **本机 git 坑(已修)**:系统级 `
credential.helper=helper-selector
`(WorkBuddy 定制)在每次认证后会去写
系统 gitconfig,失败则留下 0 字节 `
gitconfig.lock
` 并反复报错。已在仓库本地绕过:
`
git config --local credential.helper ""
` + `
--add credential.helper store
`(只影响本仓库)
## 验证脚本(tools/)
## 验证脚本(tools/)
`
test_rules.py
` `
test_scheduler.py
` `
test_directory.py
` `
test_rent.py
` `
test_round5.py
`(单元测试,全量 **147 项**)/
`
test_rules.py
` `
test_scheduler.py
` `
test_directory.py
` `
test_rent.py
` `
test_round5.py
`(单元测试,全量 **147 项**)/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment