英文:
How to override git config global at Azure DevOps local config?
问题
我有一个GitHub账户和3个Azure DevOps账户。
对于我的个人GitHub配置文件,我正在使用我的个人GPG密钥来验证我的提交和标签,这个配置是全局的,但是对于那些Azure DevOps账户,我不需要使用GPG来验证提交/标签。
我尝试过更改每个项目的本地Git配置,但是失败了,仍然在这些Azure账户上使用GPG密钥。
顺便说一下,我正在使用Visual Studio GUI来提交到这些Azure DevOps仓库。
是否有一种方法可以继续在全局(GitHub个人账户)中使用GPG,同时更改我的本地Azure仓库的Git配置以不使用GPG验证?
我尝试过以下解决方案,但都没有成功。
- 命令行和git配置 基于另一个stackoverflow帖子 项目覆盖全局和全局覆盖系统
- 我尝试了以下命令:
git config commit.gpgsign false
git config tag.gpgsign false
但它仍然使用全局配置。
- 我还尝试更改每个Azure DevOps项目的
.git/config
文件,并添加以下行:
[commit]
gpgsign = false
[tag]
gpgsign = false
谢谢您的时间!祝愿编程愉快!
英文:
I have one github account and 3 azure devops accounts.
With my personal github profile, I'm using my personal GPG key for auth my commits and tags and this config was made global, but for those azure devops accounts, I don't need to auth commits/tags with GPG.
I've tried to change local git config for each project, but It failed and still using GPG key at those azure accounts.
By the way, I'm using Visual Studio GUI to commit at those Azure DevOps repos.
It's there anyway to still use GPG for global(github personal account) and change my local azure repos git config to not use gpg auth?
I've tried those solutions, but without success.
- Command line and git config based on this other stackoverflow post project overrides global and global overrides system
- I've tried those:
git config commit.gpgsign false
git config tag.gpgsign false
But It still using global config.
- And I have tried to change .git/config file for each azure devops project and add those lines:
[commit]
gpgsign = false
[tag]
gpgsign = false
Thanks for your time! Happy coding ppl!
答案1
得分: 1
这绝对很奇怪,仅设置commit.gpgsign
没有起作用。您应该尝试将push.gpgsign设置为false,或者在提交时直接传递--no-gpg-sign,并在推送时传递相应的--no-signed。
如果后者不起作用,那么您的Git安装可能出了问题,在这种情况下,重新安装可能是最好的选择。
英文:
it's definitely weird that just setting commit.gpgsign didn't do the trick. You should try setting push.gpgsign to false, or try directly passing --no-gpg-sign when committing and the equivalent --no-signed when pushing.
If the later doesn't work then there might just be something wrong with your git installation, at that point a reinstallation might be your best bet.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论