Push Xcode Project to TFS Git repository - ios

Trying to push Xcode project to TFS (Git repository), i created local repository for my project in Xcode, then install Git Credential Manager from GitHub, then trying to connect repository from Xcode by adding remote or connect to git repository, but the error message is "Authentication failed because the authentication credentials were rejected."
Would you please provide me with the correct steps.
Knowing that TFS 2015 & Xcode 8.2

The easiest solution for me was to just add your local repository with command line.
git remote add origin ADRESSOFREPO
Afterwards you can use the version control in Xcode to push and pull

TFS 2017 offers you SSH access. The earlier versions, like 2015, requires to setup SSL and Basic Authentication on the server. I guess that this is not properly configured for you.
The steps to setup SSL are described in details in the docs.
Here you can find what is required to configure Basic Authentication.
A couple of caveats:
username should be entered in domain\user format
do not enable Basic Authentication on the default non-SSL site

Related

Adding Xcode Github Account via CLI

I'm attempting to build my iOS app on bitrise.io. This app uses an SPM package which is hosted in a private github repo. The repo is not able to be made public.
Locally the builds work, they also work locally with fastlane and the bitrise cli. When I run them on the remote pipeline, I get the following error:
xcodebuild: error: Could not resolve package dependencies:
Failed to clone repository https://github.com/USERNAME_REDACTED/REPO_NAME_REDACTED:
Cloning into bare repository '/Users/vagrant/Library/Developer/Xcode/DerivedData/ORG_NAME_REDACTED/SourcePackages/repositories/REPO_NAME_REDACTED-d35b1ef7'...
fatal: could not read Username for 'https://github.com': terminal prompts disabled
My understanding as to why this does not work, is because the Xcode instance on the remote pipeline machine, does not have a GitHub account added. I am able to do this using the Xcode GUI locally by going to Xcode > Preferences > Accounts as you can see below
The problem here is that I need to figure out a way to do this via script for the remote by providing a username and personal access token. Thus far I've spent about 20 hours looking through xcodebuild docs and messing around with different configs however I've not had any luck getting this to work.
Any help is appreciated.
Changing the Xcode project to use ssh to import the module worked for this. I had to also change the remote CI machine to use the system keychain in order to fetch the SSH key.

Importing BitBucket git repository to Team Foundation Server 2018

When I create a new Git repository in a TFS project area, there are several options to add some code.
I’ve tried the import a repository a couple of times now.
The first run gave me this error after an extended period of time. This would indicate a connection timeout based on my experience with other tools and process.
We checked the logs in the EventViewer on the application server side but couldnt find anything. We suspect an SSL/cert issue between BitBucket and TFS 2018. This is also hosted in-house.
Please double check whether the URL is correct. And please notice import service relies on basic authentication to communicate with the source repository. If the username / password you are using are not basic auth then authentication will fail and import will fail. One way to check if the username / password you are using are basic auth or not is to try using Git to clone your repository using the below format:
git clone https://<<username>>:<<password>>#<<remaining clone Url>>
Please refer to the following link for more details:
https://learn.microsoft.com/en-us/vsts/git/import-git-repository?view=vsts#frequently-asked-questions

Setup Jenkins on VSO with TFS

Has anyone successfully set up VSO & Jenkins & TFS?
Server URL: https://<myproject>.visualstudio.com/DefaultCollection
Login name and user password (using alternative credentials)
What domain name did you use? <domain>\username
If I run the tf command in Command Prompt, it succeeds, but Jenkins shows the same command as failing. I'm lost as to how to debug this. I also tried setting cached credentials for TFS, and not caching them. It seems as though Jenkins does not have cached credentials, but my command prompt does? Why would my system have stored credentials for me, but not Jenkins?
Error from Jenkins: TF30063: You are not authorized to access https://windwardstudios.visualstudio.com/DefaultCollection
With the release of version 4.0.0 of the Jenkins Team Foundation Server plugin, Team Foundation Version Control (TFVC) from Visual Studio Online (VSO) is now officially supported and both Personal Access Tokens (PAT) & alternate credentials can be used.
See the section User name and password in the wiki page.
This is an answer, but may not be what you want to hear. This used to work for us about a year ago. It required someone to stay logged into VisualStudio.com with his MSDN credentials on the build server. Then we simply didn't use credentials in the Jenkins TFS plug-in. Then one day, that simply stopped working. We tried alternative credentials, as #MrHinsh suggested, but never got it to work. Eventually we gave up and switched all of our TFS repositories to git (but still hosted on VisualStudio.com). That does work with the alternate credentials, and we have been very pleased since.
You need to configure Jenkins yo use the alternate credentials. It will not work with any other configuration and the credentials are never stored. Every command that you pass must include the same creds.

Add an xcode project in a repository tfs

I'm trying to connect to a repository tfs a written project with xcode 5.
I'm using git-tf and it seems that the configuration in xcode 5 is correct.
The problem that feedback occurs when authentication with the TFS repository.
In xcode 5 open preferences and go in the accounts. I enter the login information with the url and in response I Access denied credentials are incorrect.
What am I doing wrong?
I was encountering the same issues when trying to authenticate in Xcode 5.
Make sure that you enabled Basic Authentication for your user profile for the TFS user account and that you selected "New Team project + GIT" instead of "New Team Project".
You can also try to clone the repository by using Terminal. Type the following command into Terminal and replace XXXXX with your values.
git clone https://XXXXX.visualstudio.com/DefaultCollection/_git/XXXXX
Then provide your credentials. Terminal will now clone the repository when authentication succeeds and your credentials will be saved to your keychain. Now when you try to authenticate in Xcode it will use the saved keychain credentials and it will (probably) successfully add your TFS repository to Xcode.
I hope this will help you!
See:
http://tfs.visualstudio.com/en-us/learn/use-git-and-xcode-with-tfs.aspx
for more information
https://www.visualstudio.com/en-us/get-started/share-your-xcode-projects-vs
Share your Xcode projects in Visual Studio Online using a Git repository. Or, if your team project uses TFVC instead of Git, you can use the git-tf command line tool to check your files into Visual Studio Online.
Enable alternate credentials
You can’t sign in to Xcode with an account that contains an # character, so you’ll have to enable alternate credentials.

Connecting Aptana with Git

I am new to Git and Aptana. I have downloaded Git from the location:windows.github.com. It installed fine.
I see a default integration of Aptana with Git, but what I dont know where it is pointing to which server location?
I want to host my code on GitHub so that I can keep different machine in Synch.
Thanks
There is a difference between Git and Github's application. Once you install both Git and Github's Windows application you need to setup both Git and Github in your PC — detailed help available in their respective sites.
Both Github's app and Aptana use the settings from your Git profile in your PC while committing and these details are simply, your username and email (and other profile settings if any).
If you want to use Aptana to connect to Github, you can do so by using: Wrench icon in the project sidebar > More > Add remote Here you must add a remote repository which will be used by Aptana. More details on Git remotes here. To avoid unnecessary hassles, the Windows Github app makes this management easier. Aptana provides a GUI around Git which is exactly what the Github App does, with some additional features and ease.
Hope I haven't confused you a little more.

Resources