I am using Xcode 4.6 to develop my projects and I am using the local repository feature. However I would like to be able to push my repository to a remote ssh server.
I have tried the following but it did not work : I went to the organizer and then to my repository, I have then added a new remote with the following instructions : - Name : Just a name so I have put my project name - Location : I have put a ssh path : user@domain:path_to_my_.git_folder
Then I have entered my ssh password, but there was no confirmation button though.
Once all this was done I returned to the development window and went to File->Source Control->Push but it says there is no remote found.
So I would like to know what should I do to make it work.
Thank you.
I have found the best solution for repo's on github and bitbucket is to create an SSH key-pair with no password.
$ cd .ssh
$ ssh-keygen -t rsa -b 2048 -f github_id_rsa
$ vi config
Then add the following:
Host github
HostName github.com
User git
IdentityFile ~/.ssh/github_id_rsa
And to then refer to the repo as:
ssh://github/trojanfoe/myrepo
^^^^^^
(note that's the name of the "Host" from the config file, not github.com)
This works well in Xcode, however I see "green lights" next to the repo during a pull, but "red lights" next to the repo during a push (this might be a bug in Xcode 5.1 beta), but it works without complaint and without the need for a password, which is great if you use Jenkins to do your release builds.
The Repositories under Preferences > Accounts cannot connect using the ssh alias either, but strangely they function just fine when performing Source Control operations:
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