windows - 在哪里存储存储在 Windows 10 上的 GitLab/git 凭据?
问题描述
我试图找出在远程 Windows 10 环境中的 GitLab 中存储我的个人访问令牌 (PAT) 生成的位置,以在该 GitLab 实例上进行身份验证。
假设我已经在共享驱动器上有一个本地 git repo,我可以以自己的身份登录到我的环境,进行身份验证并像这样设置我的遥控器:
git remote set-url https://{my username}:{my access token}@{repo name}.git
这为我提供了身份验证,当我提交和推送时,我在 gitlab 实例中被正确识别。
但是,如果我注销并且同事登录并进入同一个共享驱动器上的同一个仓库,则远程将为我而不是他们进行身份验证。那就是遥控器看起来像这样:
git remote -v
> origin https://{my username}:{my access token}@{repo name}.git (fetch)
> origin https://{my username}:{my access token}@{repo name}.git (push)
这没有任何好处,因为我的同事必须要么 a) 在他们想要使用遥控器的任何时候重置 git 遥控器,要么 b) 使用我的 PAT 进行身份验证。谁能推荐一种存储用户名和 PAT 的方法,使遥控器看起来更像这样:
git remote -v
> origin https://{repo name}.git (fetch)
> origin https://{repo name}.git (push)
解决方案
推荐阅读
- typo3 - Typo3 11 pageRenderer 在顶部添加 Javasript 代码
- javascript - 在 Typescript / Javascript 中使用 URL 登录名和密码连接到 API
- scala - 在 Spark 2.0.2 中将 Spark Dataframe Stream 写入 HDFS
- python - 如何在 Python 中使用列表五次循环完成测验?
- python - 使用 sympy 在 python 中评估矩阵的多项式
- python - 填充python中两点之间的区域
- mysql - 当我尝试在 Apache 中启动 MySQL 服务器时,我被卡住了
- python-3.x - 将python泛型传递给父类?
- r - 在 R 中使用具有交互作用的模型添加预测
- websocket - 'DOMException: 无法构造 WebSocket' 无限循环中的错误