Using Xcode with arbitrary Git repository

My company uses Git repositories hosted with a service called Beanstalk. These are standard Git repositories that I can work with in the terminal window using the 'git' command line interface, which works fine and remembers my credentials.

I'd like to use Xcode's integrated version control support, but it has never worked correctly with my repositories. In some cases, it works but prompts me to enter my credentials each time I try to do something. In other cases, it fails with a message that says "failed to start SSH session: Unable to exchange encryption keys".

The account settings on Xcode only let you set up accounts with specific hosted Git services (Github, Gitlab, Bitbucket). It's nice that Xcode recognizes these specific Git providers, but how do I set up a repository that is hosted elsewhere?

Thanks.

You can set up a repository using another provider by ticking the "Create Git repository on my Mac" option and then in the source control navigator (panel on left side, second tab), expand the category for the repository. Right click on "Remotes" and select "Add Existing Remote...". In the prompt that appears in the centre of the screen, you should be able to put in your server information and add the remote.

If you already have a remote configured and everything, Xcode should be able to just see the git repository and recognise the existence of the remotes, so pushing, pulling, committing and other simpler git operations should be available from the source control menu.

Using Xcode with arbitrary Git repository
 
 
Q