I am having troubles when I connect with my repository through Xcode.
I have a Gitlab version (full pre-)installed on TurnkeyLinux Virtual Appliance on a remote server.
The user/password would only be needed for an http url, not an ssh one.
When using the http url to add a repo in your XCode Accounts, make sure there is no proxy which would prevent the resolution of the example.com
server.
If it is still not working, then, as in "Authentification issue when pushing Xcode project to GitHub", try to use an url like:
https://testuser:password@example.com/testuser/testproject.git