问题描述
我试图寻找一种使用git config匹配路径的方法。我仅发现(并测试)了此处链接中提到的一些内容。 Multiple git accounts: no .ssh/config or SSH agent usage
我也通读了https://git-scm.com/docs/gitcredentials,但要么不理解如何使用这些通配符,要么它们只是没有按我认为的那样工作。我目前有此设置:
[core]
editor = \"C:\\Users\\anton\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" --wait
sshCommand = C:/Windows/System32/OpenSSH/ssh.exe
[user]
name = firstuser
email = [email protected]
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
[merge "ours"]
driver = true
[credential "https://github.com/workuser/*"]
username = workuser
useHttpPath = true
helper = wincred
[credential "https://github.com/firstuser/*"]
username = firstuser
useHttpPath = true
helper = wincred
[credential "https://gitlab.com"]
username = [email protected]
# useHttpPath = true
helper = wincred
为他们使用ssh可以正常工作,但是我记得在防火墙之类的地方使用ssh可能是个问题。
如果我能在git的路径上进行匹配并将其与之匹配的所有路径分组以使用相同的凭据,那就太好了。但是也许我没有看到这个问题。如果我做错了,请告诉我!
先谢谢您。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)