git - 同一个域,多个没有 ssh 的 git 帐户
问题描述
我试图寻找一种使用 git config 匹配路径的方法。我只发现(并测试了)此处链接中提到的一些内容,等等。多个 git 帐户:不使用 .ssh/config 或 SSH 代理
我也通读了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 = firstuser@gmail.com
[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 = firstuser@gmail.com
# useHttpPath = true
helper = wincred
为他们使用 ssh 效果很好,但我记得在防火墙等后面可能会出现问题。
如果我可以匹配 git 的路径并将所有与其匹配的路径分组以使用相同的凭据,那就太好了。但也许我没有看到这个问题。如果我做错了什么,请告诉我!
预先感谢您。
解决方案
推荐阅读
- reactjs - 为什么为 create-react-app 生成 sessionId
- javascript - 使用 v 4 API 从公共 Google 电子表格中获取单元格值
- maven - Mapstruct 不使用 Lombok 定义的构建器
- flutter - 使用 Dart / Flutter,如何在 ListViewBuilder 中添加收藏夹?
- c# - 如何让玩家向光标 Unity3D 移动
- node.js - CORS 错误,但仅在 POST 请求中,尽管有 cors 配置(GET 没有问题)
- datetime - pyspark 从推文时间戳创建日期列
- pandas - 将两个日期之间的差值乘以浮点矢量化形式
- apache-spark - 使用目录的火花 cassandra 连接器问题
- python - 使用硒单击搜索按钮