I am using Xcode 7.3.1. on Mac El Capitan. I have cloned a project from its repo in terminal but when I try to add a repository using Xcode - Preferences -> Accounts I get authentication failed. The same happens when I try Source Control -> Checkout.
I am following the instructions here: https://docs.fabric.io/apple/beta/beta-walkthrough.html#add-udid
I have tried both gitosis#myserver:myproject.git and ssh://gitosis#myserver:myproject.git.
In terminal, git clone gitosis#myserver:myproject.git works fine.
I do have git-flow in this repo, could that upset xcode? I have tried just checking out master branch and using that with xcode but it didn't make any difference.
Another possible problem is that my git config file sets a port different to 22 and it may be that xcode does not pick this up from the config file and uses port 22 regardless?
I finally fixed this by entering the git connection string as ssh://myserver.com:2245/my-project.git.
Xcode apparently does not read my config file which was evident when it prompted me for the default certificate id_rsa instead of the one specified for the named server, together with the port specified in my ~/.ssh/git/config file.
I hope this helps somebody not to waste a couple of days as I did.
Related
For some reason I'm getting an error message on Bitrise.io saying the scheme cannot be found within the project. It says to use the -list command, however doing that locally finds the scheme fine.
I know a common reason for this problem is not having your scheme shared, however I've checked this and it appears to be shared correctly.
I'm using the Xcode test for iOS step within my workflow. Another odd thing is running the build command locally works perfectly fine too.
Can anyone suggest any ideas for resolving this issue?
I'm getting an error message on Bitrise.io saying the scheme cannot be found within the project
It's not bitrise what prints this error, it's Xcode (Xcode's Command Line Tool, xcodebuild).
The most common cause of this issue is if you don't mark the scheme as shared. If you did, you should also check your gitignore list - shared schemes are have to be stored in the git repository, the related files can't be ignored!
Related docs: http://devcenter.bitrise.io/ios/frequent-ios-issues/#xcode-scheme-not-found - and related section:
Don't forget to commit & push the changes if you just enabled the Shared option!
This change should be reflected in your git repository,
under you project / workspace
(which is actually a directory, just seems like a file in Finder):
*.xcodeproj OR *.xcworkspace/xcshareddata/xcschemes/SchemeName.xcscheme.
If you still can't see the desired Scheme,
try to look into your .gitignore file and check if you are ignoring the config files of your Xcode project.
This file have to exist after you do a clean git clone into a new directory on your Mac/PC.
I've managed to solve this problem for me by moving from xcode 8.2 to xcode 8.1.
I have setup an Xcode server and using Xcode Bots to do CI in my machine. (Same is used for development.)
Creating a bot for a project, works fine. However, if I add the same project to the workspace, (I have shared the scheme - [which is set to the workspace container] so that is not the issue.) I am getting the below error.
xcodebuild: error: Unable to find a destination matching the provided
destination specifier:
The git currently resides on the Xcode server.
(Followed the steps here)
Also noticed that, once I clone the repository and open the .xcworkspace, the project and the scheme is not displayed.
I suspect this to be the issue. However, not able to find a way to fix this. Any help is greatly appreciated. Thanks!
[Using Xcode version: 7.3.1 on OS X El Capitan v: 10.11.4]
I had/have Source Control working with Xcode 7.0 beta 5, but when I try to do a Commit in my newly installed Xcode 7.0 GM it won't work. (The new Xcode 7.0 GM had replaced my previous Xcode 6.4 version, which never had Source Control working.) I get the error message The working copy "APP NAME" failed to commit files as is seen in the following image:
This question is similar to
XCode Won't Commit To GIT
Xcode and Git Source Control : “The working copy XXXXX failed to commit files”
but for mine it does work in the beta Xcode version, just not in the standard version.
I tried running the suggested command line commands as per this answer, but there was no noticeable difference. It seems like there must be some file I could edit or replace, but I don't know where it is. Both of my Xcode versions use the same project folder.
Update
Typing git config --list inside the project directory I get the following (email changed, but correct):
user.email=my_correct_email#mymail.com
user.name=Suragch
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
remote.MongolAppDevelopment-iOS.url=https://github.com/suragch/MongolAppDevelopment-iOS.git
remote.MongolAppDevelopment-iOS.fetch=+refs/heads/*:refs/remotes/MongolAppDevelopment-iOS/*
branch.master.remote=MongolAppDevelopment-iOS
branch.master.merge=refs/heads/master
Again, I can make edits to the project in the standard Xcode but in order to update git I have to go back to the Xcode beta.
git config --list gives you local and global (and system) git configs.
Check if user.name is still registered in the local repo: git config --local -l
If not, it is likely that the XCode7 beta consider a different $HOME, while your command line uses the regular HOME (in which you have a .gitconfig iwth your user.name and user.email)
Simply try and set those in your repo:
cd /path/to/rpeo
git config user.name Suragch
git config user.email my_correct_email#mymail.com
I just updated to Xcode 7, all system is updated, including command line tool, repaired disk permissions. And I still have several issues with that Xcode.
I am using GIT, but when I launch my project Xcode is ALWAYS asking me to upgrade to Subversion 1.7 even when I click on "Don't warn me again for this workspace" he does not remember.
When I quit and relaunch Xcode do not use my credential for GIT when I push he ALL the time ask me to type them.
When I go to preferences it builds up a stack of ghost buggy accounts...
And when I go to github, I realised that Xcode do not send my user.email when committing and pushing as I got a default email of ganzolo#noreply.github.com.
It's really annoying and buggy, does anybody have a clue?
I've removed SVN but still when I am doing a regular commit from command line (Git uses my user.email), when I am doing from Xcode he send like anonymous, really annoying.
You must have a subversion repo in your source tree, possibly in a 3rd-party library, that you are unaware of.
Go to Terminal and do this to upgrade it:
$ cd /path/to/sourcetree
$ find . -name .svn
If you get a hit then:
$ svn upgrade path/of/svnrepo
Better still dump the .svn directory and use git all the way through, if this 3rd-party library is also part of your permanent source tree.
Thanks to this post I found a solution :
https://stackoverflow.com/a/32546171/706189
It appears that Xcode have a bug and do not read global user.name and user.email. Therefor you need to set it locally in your root folder project.
I am using the Jenkins Xcode plugin (https://wiki.jenkins-ci.org/display/JENKINS/Xcode+Plugin) to build an iOS application, however it hangs when running the following command on a project I have inherited from another developer:
$ /usr/bin/xcodebuild -list
It also hangs when I run this command manually from a terminal. Does anyone know what the cause may be? The warning displayed is also displayed on another project I have, but it does not hang in this case.
Running Xcode 6.1 on OS X 10.10
$ /usr/bin/xcodebuild -list
2014-11-12 04:47:21.234 xcodebuild[42642:1431240] [MT] DVTAssertions: Warning in /SourceCache/IDEFrameworks/IDEFrameworks-6604/IDEFoundation/SourceControl/Model/IDESourceControlManager.m:423
Details: Error Domain=com.apple.dt.IDESourceControlErrorDomain Code=-1 "Missing extension: public.vcs.subversion" UserInfo=0x7f9792309200 {NSLocalizedDescription=Missing extension: public.vcs.subversion}
Object: <IDESourceControlManager: 0x7f9792302860>
Method: -loadRepositories
Thread: <NSThread: 0x7f9790d2dbe0>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
Information about project "DOHSmokefree":
Targets:
DOHSmokefree
DOHSmokefreeTests
Build Configurations:
Debug
Release
If no build configuration is specified and -scheme is not passed then "Release" is used.
TLDR; My solution: Mark the schemes as shared in XCode if building them from the command line as a different user, or without ever opening XCode on the build machine.
I was having this same problem, intermittently on our CI server. I came across this question. The accepted answer with the problem being an issue and fixing the SVN version did not work for me as the SVN being used on the CI server was the default SVN and it was, as mentioned, working intermittently.
What I finally noticed is that, between a working version and a non-working version the schemes were not being listed. I had recently upgraded a library on the project and that got me to thinking about the schemes. After realizing that schemes are stored locally per user, unless shared, the fix for me was to go into the scheme manager and mark the schemes as shared.
The problem apparently being that the CI server user never actually opened the project in Xcode, thus causing the list command to hang because there were no available schemes for the user to build.
The times when it had intermittently worked were times after, logged in as the CI server user, I had opened the project in Xcode to test the build process, thus creating the necessary schemes. Wiping the CI server or refactoring/adding schemes would cause the build to break until the project was reopened in Xcode in desperation.
I had a similar issue when updating to Xcode 6.1 while using a newer version of subversion on the command line.
Disabling Source Control in Xcode Preferences should do the trick.
If that isn't an option you might try replacing the subversion implementation inside Xcode as I have done, using this technique: Use SVN 1.7 in XCode 4.3+
Basically that would be the following steps:
This assumes you already have SVN 1.7 installed to /opt/subversion, you can get it from WANdisco: http://www.wandisco.com/subversion/download#osx
Now open the Terminal and get an elevated shell using sudo -s.
Then, cd to inside the XCode.app package, to where the SVN binaries are.
Make a backup directory and move the old SVN files into it
bash-3.2# mkdir bup
bash-3.2# mv svn* bup/
Lastly, symbolically link the new files into the package:
bash-3.2# ln -s /opt/subversion/bin/svn* ./
That’s it!
I have the same problem on OS X 10.10 with XCode 6.4,just close XCode's Source Control to solved this issue:
run XCode
open Menu: XCode -> Preferences...
Click "Source Control" Tab and uncheck "Enable Source Control"