Bot integration with local repository - ios

I am trying to create bot with my local repository created on mac. But integration fails always. I am using simulator for testing. I have also selected simulators from device settings.
But getting following error always-
SSH Known Hosts file path is located at /Library/Server/Xcode/Config/ssh_known_hosts
SSH strict host checking is enabled (you can disable this by editing the SSHStrictHostKeyChecking key in /Library/Server/Xcode/Config/xcsbuildd.plist
Untrusted HTTPS certificates is disabled (you can enable this by editing the TrustSelfSignedSSLCertificates key in /Library/Server/Xcode/Config/xcsbuildd.plist
ab59d95ce4458b340114a7aefb9f16479f05982b refs/heads/master
SSH Known Hosts file path is located at /Library/Server/Xcode/Config/ssh_known_hosts
SSH strict host checking is enabled (you can disable this by editing the SSHStrictHostKeyChecking key in /Library/Server/Xcode/Config/xcsbuildd.plist
Untrusted HTTPS certificates is disabled (you can enable this by editing the TrustSelfSignedSSLCertificates key in
/Library/Server/Xcode/Config/xcsbuildd.plist
Do I need to generate ssh key?
I have generated ssh key also but how can I add it for local repository on my mac
Plz help if u have any idea.
Thanks

Actually, this article might have the answer to your problem:
Missing xcsbuildd.plist file on OS X 10.9 Server

Actually, if you pointing bot to a git via https, so these messages are not errors, they are warnings. I have two bots now and they goes to our internal git server by https, and successfully fetching sources and displays this message anyway.
As you said, your integration fails. If bot can't get sources, it will write that checkout sources failed.
To understand what actually goes wrong you should look through the Build Failure Log under the Logs tab in the your integration in the Xcode or in the safari. (I would recommend you to look in the safari because if your log is huge, safari will load it much faster than Xcode). Yeah, it's not very comfortable, but it's not very hard. At some point you'll see the git command arguments and, perhaps, error reason a few lines below.

After configuring everything as it should be in Xcode Server, I get two different results.
When I create a bot in Xcode: internal-checkout-error.
When I create a bot in Safari: Works like a charm.
Both with the exact same project, the exact same Xcode Server host. Apple did more than their usual level of obfuscation, here...

Related

No supported authentication methods available (server sent: publickey)

I have created ssh key using the command ssh keygen and I have added the public key to my bitbucket account and then I have added the key to the ssh agent also, But when I tried to clone repo from bitbucket using sourceTree, I am getting the below Error.
Error: FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
and I know this is repeated question but those solution didn't worked for me, So please help.
Well, It was my mistake actually,
SSH Client type was set to PuTTY/Plink in my SourceTree Settings, So I changed it to openSSH and now that issue is no more.
Sorry & Thanks.
I am using SourceTree to access an enterprise GitHub server, and had the same issue all of a sudden start occurring to me even though it has been working fine for over a year and nothing had changed. Apparently, somehow my SSH Client Type was swapped to PuTTY/Plink. Switching it to openSSH again fixed the issue for me by going to Tools -> Options -> General -> then selecting OpenSSH as the SSH Client under the SSH Client Configuration section.
Changing the SSH Client type to openSSH in Source Tree - tools -> Options -> General solved this error for me.
(I posted the following to atlassian.com bug report)
We had the same issue. We noticed that the Pageant (in the icon tray) would not start.
For us it appears that our antivirus was blocking it somehow. Thus we do the following:
disabled the antivirus
uninstall SourceTree (SourcetreeEnterpriseSetup_3.4.6.msi)
installed SourceTree (SourceTreeSetup-3.4.6.exe)
reconfigured SourceTree
We noticed that Pageant was now running and ssh calls worked.
Reenabled the antivirus.
So far so good.
In my case, I was getting same error but the "pageant" program installed was very very old, but worked after updating it (via the putty installer). Credit to https://superuser.com/users/106302/fabian # https://superuser.com/a/404286/658383

Your connection is not private NET::ERR_CERT_COMMON_NAME_INVALID

I am facing strange issue on chrome while debugging local ASP.NET application on chrome. I am not able to open localhost without https. With Https it's giving error: Your connection is not private NET::ERR_CERT_COMMON_NAME_INVALID.
It was working on chrome till last update & is working on firefox & IE.
There is also no option in advanced setting to skip error & visit site.
Please help.
Finally banging head on desk for two days I found this setting in chrome://flags/ to Allow invalid certificates for resources loaded from localhost.
finally no disable all certificate error, only for localhost. Adding answer for someone struggling with same issue.
We have found that the best (and only) way to override Chrome is to type the phrase thisisunsafe at the Chrome generated webpage that blocks you. Just type the text directly to the page; there will be no text entry box.
We have servers on an internal network which use SSL but which are not externally signed and this is the only way to get to them.
Just when the page loads, don't click on page and type: thisisunsafe.
Page will automatically refresh and will load the content.
You can copy this tag and add to Google Chrome shortcut to bypass this warning permanently.
--ignore-certificate-errors
Updated - March 2020: Adding the above tag to Google Chrome shortcut does not work anymore. In order to temporarily turn off or bypass this annoying warning from Google Chrome, to go chrome://flags and search for this following entry:
Allow invalid certificates for resources loaded from localhost
After that, enable the option and restart your Google Chrome browser. By doing so, you can bypass the alert as long as you want until you turn off the option.
Source: Fix Your Connection Is Not Private Error In Your Browser
There is a short explanation over at serverfault as to what changed in the RFC spec to cause this. One of the suggestions is to use or add the IP address (presumably 127.0.0.1) to the name 'localhost' for the DNS property of the self-signed cert.
If you use the dotnet core tool: dotnet dev-certs https --trust (or run the export per instructions in devcontainer.json) the localhost certificate generated will use only the name 'localhost'.
But there are other options for generating self-signed certs including Powershell. But...rather than follow the older syntax, use Example #9 as found on the New-SelfSignedCertificate docs:
New-SelfSignedCertificate -Subject "localhost" -TextExtension #("2.5.29.17={text}DNS=localhost&IPAddress=127.0.0.1&IPAddress=::1")
This appears to resolve the cert error in Chrome (96.0.4664.45). It's necessary to close and re-open Chrome after generating the new cert and incorporating it into your web project or container.
I ran into this error and my problem turned out to be Charles (it's a web debugging proxying app). I needed to install a SSL Proxy Certificate for Charles.
Go to Help menu
SSL Proxying -> Install Charles Root Certificate
Open Keychain Access and enable/allow it
If you don't use Charles then obviously this answer doesn't help you at all.
I had similar problem when I tried to use my self signed certificate and run my xhtml app in browser under https and with tomcat. What I did:
in java's RE dir (usually Program Files\Java\jre1.8.0_202\bin) there is keytool and in command line I used this:
keytool -genkey -alias example -keyalg RSA -sigalg SHA256withRSA -keysize 2048 -validity 3650 -keystore "C:\yourdir\yourkeystore.jks" -ext san=dns:localhost,dns:yourdesktophostname,ip:127.0.0.1,ip:::1
Answer questions to create certificate which is created for 10 years, SHA-2 and what Chrome needs more: san(SubjectAlternateName).
I added below lines to tomcat's server.xml (usually Program Files\Apacha Software...\conf:
<Connector port="yourportnumber" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true"
compression="on" scheme="https" secure="true"
keystoreFile="conf/yourkeystore.jks"
keystorePass="yourpassword"
SSLVerifyClient="none" SSLProtocol="TLSv1.2"/>
Restart Tomcat.
Open the localhost address in Chrome browser (https:\localhost:yourport). It will tell "Not secure" at left side of address line and https crossed out Click on it and in that window press on certificate (invalid). It opens the certificate window and press on Details tab and press on copy to file button. Create crt file as instructed.
Open up Chrome Settings > Show advanced settings > HTTPS/SSL > Manage Certificates. Select Trusted Roots tab and import the crt file here. Edit this certificate and mark all check boxes.
Restart Chrome
It's 2022 now and web everywhere is using https protocol. Sooner or later the hacks and workarounds in this post will become more and more annoying or not work anymore. If you are developing web applications, even for testing, you will need to either get a free SSL certificate or issue your own certificate for in-house uses.
For free certificates, there are three popular web sites providing this service:
https://www.sslforfree.com/
https://letsencrypt.org/
https://zerossl.com/
If you're developing a local web application for your company intranet, you should generate your own SSL certificate using OpenSSL with the information below.
If you would like to generate your own certificates for different purposes, using the latest OpenSSL tool (version 3.0 series) becomes very convenient and relatively easy, too. Just follow the steps listed on this SocketTools page.
https://sockettools.com/kb/creating-certificate-using-openssl/
I have just completed and make our internal web server and application free of security warnings on any browsers. Once you've got familiar with the simple commands and you will be able to expand the OpenSSL uses to other web application projects.
I was trying to run my first .net Core web app in chrome and had same error. Using Version 84.0.4147.135 of Chrome.
To Resolve (quick fix),
When you run the application you will see two options 'Advanced' and 'Back to safety' on page, shown by chrome browser.
Click Advanced button, it will show you 'Proceed to localhost(unsafe)'. Click that and your application should work.
(I know above one is not a actual fix. The actual resolution is about adding localhost certificate as trusted root certificate.)
If you want to install certificate - When you will see error and if you click on error - 'NET::ERR_CERT_AUTHORITY_INVALID' it will show you certificate. Copy that and install into trusted root. I tried that however it didn't resolved my issue. I will update it if get resolution to this.
Just figured out how to solve this! Click on the Debug tab in the top menu and click on Debug Properties (right below Options), then scroll down and uncheck Enable SSL. Now try debugging your application again and it should work! It may take a minute to load but it definitely solves the problem...
I also had the same problem. By default Chrome uses google.com which didn't work for me but google.com.bd worked for me(I live in Bangladesh). So if u live in for example in the UK, google.com.uk might work.
Go to this link it will help,
https://superuser.com/questions/169014/chrome-set-search-bar-to-google-co-uk-not-google-com
For angular apps using ng serve, you might have something like this in your package.json file:
"start:windows": "ng serve --port 44470 --ssl --ssl-cert %APPDATA%\\ASP.NET\\https\\%npm_package_name%.pem --ssl-key %APPDATA%\\ASP.NET\\https\\%npm_package_name%.key",
Go to that folder, e.g. C:\Users\{username}\AppData\Roaming\ASP.NET\https, and delete the .key and .pem files for your project. Next time you run it should regenerate them correctly.

Xcode bots server continuous integration hangs on "Getting sources..."

I setup a copy of OSX server and correctly configured it with Xcode. I was able to create a bot and run a few integrations which failed because I didn't import the correct developer certificates. Running an integration now it seems to be stuck at "Getting sources.." while Xcode is showing it as being queued. Any ideas?
There are lot of reasons this might be happening and it depends on what version control system you are using. For both git and svn the issue might be the root ssl certificates. You need to add the root certificates from your keychain to your ssl configuration.
See this post for details.
If the problem isn't SSL certificate related then it will likely be a timeout issue fetching your source repository if it is very large. Check your integration logs for details.

Internal Server Error Xcode Continuous Integration

I've successfully created a Bot and run an integration test for an iOS application hosted on a remote SVN server over HTTP. When trying to run the same test over HTTPS the test fails and I receive the error: Integration failed. Unexpected internal server error. See the integration's logs for more details. The certificate used for the SVN server is self signed and I ensured I am able to still update/commit to the server over HTTPS. After looking through the logs I can't seem to find out what the error is or how to fix it. (I would post the logs but it's like 100 pages to read through...)
Steps taken so far:
Deleted the bot and project, checked out the project over HTTPS, re-made the bot.
Ensure the correct HTTPS repository is listed both in OS X Server --> Xcode --> Repositories, and in Xcode's repository preferences. (Deleted the old repository as well)
Place the self signed certificate into the keychain's System Store and ensure it is set to Trust All.
Modified the Xcode config file xcsbuildd.plist and changed TrustSelfSignedSSLCertificates to true.
Nothing has seemed to fix it so far. If anyone can think of a fix for this issue please let me know.
I finally was able to fix this by adding to the System keychain our company's Root certificate authority and Intermediate certificate authority certs.
I used Charles (web debugging proxy) to intercept requests and responses and see what was wrong. It gave me a clue that OS X Server was struggling with certs.

In Xcode 5 getting error when i add the server under the source control

When I create new project in Xcode 5, Am trying to add new server for source control. But am getting error alert like this "The Xcode service is disabled on this server. Please contact your administrator for help".
Please check out how to turn on the OSX Server Xcode service at the following link:
https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/xcode_guide-continuous_integration/200-Adopting_a_Continuous_Integration_Workflow/adopt_continuous_integration.html#//apple_ref/doc/uid/TP40013292-CH3-SW1.
If review of this guide does not fix your issue please let me know more specifics about your environment. If it does help please consider accepting the answer so others will locate the resource.
Important Conceptual Notes:
When you setup a new project and you are offered a server this refers to an OSX Server only (not github or any non-OSX external server):
So basically just make sure the OSX Xcode service is ON or restart your 10.9+ OSX server if possible...
NB: If what you want to do is to push your repository to github.com or code.google.com please see the following links for instructions on getting this to run in Terminal. Once the link between the remote repository and your local directory then Xcode will be able to push updates to your remote repositories (this will be available as a checkbox when you commit your project).
Github Help
Pushing to Google Code
It sounds like you want to add a repository, not an XCode Continuous Integration server.
Adding a server is adding an XCode Continuous Integration server.
Use add repository instead. See the guide in the first link.
It seems like a "Server" in apple's definition is not a BitBucket server or GitHub server, it has to be a server that you host by yourself. Otherwise you are looking at adding a "repository".
I got enlightened by the screenshot below, note the server address:

Resources