Builds using GitHub.com fail with VCS errors since February 23 - FIX AVAILABLE

Featured

Please beware that on February 23, 2018 GitHub.com deprecated some of the security algorithms in their ssh implementation and the tools which did not have support for the newer algorithms stopped working.

TeamCity versions before version 2017.2.1 are partially affected.

It is recommended to upgrade to the latest TeamCity version which already has all the necessary support.

Patches for TeamCity versions 10+ are also available. Check all the details and links to the patches. Upgrade to the latest is highly recommended for all the earlier versions.

As a workaround you can try switching to "https://" URL in the affected VCS roots and provide your github.com credentials for authentication. This will work however only if you run TeamCity with Java 1.8. For agent-side checkout make sure to upgrade native git client on agent machines as old git can still fail with error like "unable to access 'https://github.com/...': error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version"

Using https might not work for some specific cases, so upgrade is by far the most preferred way to get a fix for this issue and also get a fully supported version with many fixes, improvements, latest security updates and lots of new features.

The error can manifest in the messages like:

List remote refs failed: com.jcraft.jsch.JSchException: Session.connect: java.net.SocketTimeoutException: Read timed out

Unable
to collect changes: Failed to collect changes, error: List remote refs failed: com.jcraft.jsch.JSchException: Algorithm negotiation fail

List remote refs failed: com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: End of IO Stream Read

There was a problem while connecting to github.com:22
Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

Error downloading patch into temporary file "...": Failed to obtain stream from server. Server status: 404 (Not Found)

 

4 comments
Comment actions Permalink

Thank you very much. I have updated Git plugin and now its working fine.

0
Comment actions Permalink

In case I'm not the only one stuck with hundreds of SSH VCS roots, unable to apply one of those patches for whatever reason; here is a Python script I hacked together to convert my VCS roots from SSH to HTTPS.

0
Comment actions Permalink

Hello everyone, 

 

I am in the catastrophic situation where i lost access to github due to the reported issue above and i am unable to switch to HTTPS checkout, 

i have 2fa enabled on github so i created an access token and in the fetch URL i provided the correct link that includes the access token and i provided the username and password. 

i get the following error: 

error: List remote refs failed: org.eclipse.jgit.errors.TransportException: https://github.com/***********************.git: not authorized

i have jre 9.0.4 installed 

and i am stuck with teamcity 9.1.6 , can't upgrade for several reasons. any body was able to make https checkout work with this version ? 

Many thanks

0
Comment actions Permalink

I am supporting an older release of Teamcity (7.0.3).   Other than upgrading, what is the solution to this github algorythm error? 

 

Is there a git plugin that can be installed?

These are our agent environment details.  We are using an older JDK as well.

 

 

   /usr/bin/nohup
_system_arch  x86_64
_system_name  CentOS
_system_type  Linux
_system_version  6
G_BROKEN_FILENAMES  1
GEM_HOME  /home/teamcity/.rvm/gems/ruby-1.9.3-p545
GEM_PATH  /home/teamcity/.rvm/gems/ruby-1.9.3-p545:/home/teamcity/.rvm/gems/ruby-1.9.3-p545@global
HISTCONTROL  ignoredups
HISTSIZE  1000
HISTTIMEFORMAT  %F %T
HOME  /home/teamcity
HOSTNAME  PROD-TEAMCITY01
IRBRC  /home/teamcity/.rvm/rubies/ruby-1.9.3-p545/.irbrc
JAVA_HOME  /usr/lib/jvm/java
JDK_16  /usr/lib/jvm/java
LANG  en_US.UTF-8
LD_LIBRARY_PATH  /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.35.x86_64/jre/lib/amd64/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.35.x86_64/jre/lib/amd64:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.35.x86_64/jre/../lib/amd64::.
LESSOPEN  ||/usr/bin/lesspipe.sh %s
LOGNAME  teamcity
MAIL  /var/spool/mail/teamcity
MY_RUBY_HOME  /home/teamcity/.rvm/rubies/ruby-1.9.3-p545
MYSQL_HISTFILE  
NLSPATH  /usr/dt/lib/nls/msg/%L/%N.cat
OLDPWD  /data/teamcity/buildAgent/bin
PATH  /home/teamcity/.rvm/gems/ruby-1.9.3-p545/bin:/home/teamcity/.rvm/gems/ruby-1.9.3-p545@global/bin:/home/teamcity/.rvm/rubies/ruby-1.9.3-p545/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/pgsql-9.3/bin:/home/teamcity/.rvm/bin:/home/teamcity/bin
PWD  /data/teamcity/buildAgent/bin
rvm_bin_path  /home/teamcity/.rvm/bin
rvm_loaded_flag  1
rvm_path  /home/teamcity/.rvm
rvm_prefix  /home/teamcity
rvm_stored_umask  0003
rvm_user_install_flag  1
rvm_version  1.25.25 (stable)
SHELL  /bin/bash
SHLVL  3
TEAMCITY_CAPTURE_ENV  /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.35.x86_64/jre/bin/java -jar /data/teamcity/buildAgent/plugins/environment-fetcher/bin/env-fetcher.jar
TEAMCITY_DATA_PATH  /data/teamcity
TEAMCITY_GIT_PATH  /usr/bin/git
TERM  linux
TMOUT  900
USER  teamcity
XFILESEARCHPATH  /usr/dt/app-defaults/%L/Dt
0

Please sign in to leave a comment.