Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 10.1 push to github using ssh key

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

enter image description here

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).

like image 783
Khurram Shehzad Avatar asked Dec 21 '18 06:12

Khurram Shehzad


People also ask

Do you need a SSH key to push to GitHub?

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.

How do I SSH in Xcode?

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.

What is SSH key GitLab?

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.


1 Answers

Create a key with the following command:

ssh-keygen -t rsa -C "[email protected]" -m PEM

Should add -m PEM

like image 51
Yiting Lu Avatar answered Sep 28 '22 00:09

Yiting Lu