I had created my ssh keys manually from command line and added to my gihub, gitlab accounts. Everything work fine e.g cloning, pushing, pulling etc using command line and source tree client.
The problem is when I try to push using xcode it gives me error saying that Authentication failed because the credentials were rejected
. See screenshot
Please note that Xcode is able to clone the repos using ssh keys but is not able to push(for pushing the changes I either use command line or source tree).
In order to push, pull and clone securely between your local Git installation and a remote GitHub or GitLab repository, you must first create an SSH key pair. This both identifies you and authenticates your local Git installation with the remote GitHub or GitLab server to which you are attempting to connect.
To configure repository access in Xcode Server Click Edit Repository Access to configure which protocols can be used to access the hosted repositories. By default, HTTPS is selected. You can also select SSH. If you select SSH, Xcode Server displays a dialog asking whether to allow remote login using SSH.
The SSH stands for Secure Shell or Secure Socket Shell used for managing the networks, operating systems and configurations and also authenticates to the GitLab server without using username and password each time. You can set the SSH keys to provide a reliable connection between the computer and GitLab.
Create a key with the following command:
ssh-keygen -t rsa -C "[email protected]" -m PEM
Should add -m PEM
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With