Adding Xcode Github Account via CLI - ios

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.

Related

Fail resolve swift package hosted on azure devops in azure pipeline, SSH fingerprint failed to verify

I know this is common question but none of the solution working for me.
I've a swift package hosted on private repo in azure devops. In pipeline, i've setup task Install SHH key following document with passphrase and locally swift package resolve, authentication success. But in pipeline it fails with message "SSH fingerprint fail to verify".
I searched a-lot and there are few links below sharing, solution i've tried so far
Adding identity to known_host, manually calling swift package resolve.
https://developercommunity.visualstudio.com/content/problem/1025313/swift-package-manager-the-server-ssh-fingerprint-f.html
https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388
https://bonkowski.net/posts/ios-azure-pipeline/
I'm not sure, is there any way to get detail logs?
Resolved, it was because of dev.azure.com it should be ssh.dev.azure.com, while adding host entry to known_hosts.

Users cannot deploy to Nexus 3 using maven, only using the UI

I am writing instructions on how to set up Travis CI to deploy to our local Nexus 3 maven repository. I am testing my own instructions to make sure everything works. I have discovered that I cannot upload any artifacts using maven unless I use administrator credentials. As a regular user, I can upload using the provided web UI, but not maven.
All the users have full admin rights over the hosted repositories as well as the nx-component-upload privilege which enables the UI upload.
I must be missing something. The error message I get when running maven deploy is:
org.apache.maven.shared.transfer.artifact.deploy.ArtifactDeployerException: Failed to deploy artifacts: Could not transfer artifact nz.org.riskscape:rsum_api:jar:1.0 from/to juglab-release (https://dais-maven/repository/juglab-release/): Failed to transfer file https://dais-maven/repository/juglab-release/nz/org/riskscape/rsum_api/1.0/rsum_api-1.0.jar with status code 401
Thanx in advance for any help
I finally got it to work. The problem was in the settings file, the username had been misstyped.

Continuous Integration with hybrid mobile app

I have a problem. I need to build a job in my Jenkins server hosted by macmini (localhost) to automatic build a deploy for my mobile hybrid apps. That's apps was building with ionic2, and need a deploy for Android (apk) and for iOS (ipa).
But when i run a build from Jenkins, with this shell command
I get this error
that's not all... because i try to execute, from the jenkins folder, the npm i and the result was this:
When i try to build my application from other "folder" and not from jenkins, they works correctly. How i can solve?
Without more information hard to say; you can either just script the things you do when you deploy "manually", or you might want to try a CLI tool like https://www.bitrise.io/cli or https://fastlane.tools which can auto-scan your project and configure a suitable configuration which is then easier to tweak.
In case of Bitrise CLI the base config can be generated with bitrise init in the repo root, and you can also use a visual editor to modify your configuration: https://discuss.bitrise.io/t/how-to-experiment-with-bitrise-configs-locally-on-your-mac-linux/1751
After a lot of time, just find the solution. Jenkins have a own "tools management". So i need to install, into jenkins, a property version of nodeJS, Npm and all other tools i need to deploy the application.
So, first of all you need to install property plugin (in my case nodejs).
After this, going into Jenkins Management System and configure a NodeJS version. That's all

Push Xcode Project to TFS Git repository

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

Unable to configure a non java project on Jenkins

I have a non-Java project for which I want to automate the build through jenkins.
I have create a job with free Style type. Then I have checked out the SVN repository to my local machine. For testing purposes, I want to first build the project locally.
I have Repository URL : file:///C:/MyProject/.
I get an error: Unable to access file:///C:/MyProject : svn: E180001: Unable to open an ra_local session to URL.
Also I tried with credentials, but am still getting same error.
Note: credentials I have given are the ones which I use to login to my local machine.
Please assists.

Resources