Hi!
I have recently created a new ed25519 SSH ( I was still using an RSA key previously). I figured this would be easy:
-
Create new SSH key and add to Gitlab and Github accounts
-
Add keys to remote servers by running
provision trellis --tags=users <env>
- update my
.ssh/config
to use the new key for forwarding:
Host *
AddKeysToAgent yes
UseKeychain yes
ForwardAgent yes
IdentitiesOnly yes
IdentityFile ~/.ssh/id_ed25519
- add new ssh key to keychain
ssh-add --apple-use-keychain
However my deployments fail now during the [deploy : Clone project files]
step.
I think for some reason my old key is still used when trying to connect to Gitlab to clone the project but fail to understand why. I have tried loads of things:
- remove
.ssh/id_rsa
&.ssh/id_rsa.pub
and restart (ssh-agent & reboot computer) - remove rsa key from keychain
- run a full reprovision
-
sudo reboot
remote server - clear known_hosts both locally and on remote server
- Double check SSH key is correct at https://gitlab.com/Abel-Sch.keys and added to remote servers
known_hosts
One thing I found strange is that when I run:
ssh -T git@gitlab.com
or ssh -T git@github.com
locally they both work properly, but while connected to the remote server Github authenticates succesfully but Gitlab fails (this project is hosts on Gitlab).