Forum Discussion
Multi GitHub Accounts Use. Implement a command.
Hello, I had a problem and I am going to post it here to help anyone that has the same problem. I have 2 accounts of GitHub and I have the problem to use both of the accounts when I need and use 1password to have the private keys. I use this config for this git agent.toml
[[ssh-keys]]
and use a ~/.ssh/config file : ```
vault = "Personal"
Acc 2
Host
HostName github.com
User git
IdentityFile ~/.ssh/
IdentitiesOnly yes
Acc 2
Host
HostName github.com
User git
IdentityFile ~/.ssh/
IdentitiesOnly yes
```
When you want to use a account or other (with the "ssh key") you have to use the regular github repo remote add . Then you have to replace the mailto:git@github.com with the . Then I created this .bat script ```@echo off
echo Configurando Git...
git config --global user.name "x"
git config --global user.email "x"
git config --global user.signingkey "x"
echo Configuración completada.
pause
```
I have created a folber with a sys path and then i put the file in the sys path folder and only had to put the name of the file in the terminal and it is configured for your multiaccount git setup.
1Password Version: 1Password for Windows 8.10.36 (81036046)
Extension Version: 2.25.1
OS Version: Windows 11 Pro 23H2
Browser: Brave v1.67.134
- Former Member
I am having the same issue. If i REMOVE this part form .gitconfig
program = "/mnt/c/Users/****/AppData/Local/1Password/app/8/op-ssh-sign-wsl"
then VERIFY works, but then SIGNING does not work.
- Former Member
And if I run
git cat-file commit HEAD
it displays the correct signing
```
tree c7ab563e653d3b0222846f18654c2e5e98635cf8
author hydrostic <{mail1}> 1702545860 +0800
committer hydrostic <{mail1}> 1702545860 +0800
gpgsig -----BEGIN SSH SIGNATURE-----
-----END SSH SIGNATURE-----
```