Skip to content

After restarting my client following a desktop client update prompt, I can no longer Fetch Origin #4817

Closed

Description

@michellepurcell

Description

image

Version

  • GitHub Desktop:

image

  • Operating system:

Windows 7 professional.

Steps to Reproduce

  1. I restarted the GH desktop client after noticing a prompt that there was a new update.
  2. I made a change to content in a repo.
  3. Now when I click fetch Origin I get the error above. I have not touched my properties, my password or anything.

Expected Behavior

Fetch original to work as normal.

Actual Behavior

Additional Information

Logs

2018-05-30.desktop.production.log

Activity

  1. shiftkey commented on May 30, 2018

    @shiftkey
    Member

    @michellepurcell thanks for the report. We published an update a couple of hours ago to address a Git security issue, and I'd received a report about a potential SChannel issue, but I couldn't reproduce it myself.

    Could you do me a huge favour and open a shell and run this command? This will help with troubleshooting and reporting this upstream:

    $ git config --show-origin -l
    
  2. michellepurcell commented on May 30, 2018

    @michellepurcell
    Author

    image

  3. shiftkey commented on May 30, 2018

    @shiftkey
    Member

    @dscho I'm going to put together a test release now to downgrade to 2.17.0 and confirm this is specific to the latest build - is there any diagnostics or tracing here you'd like to gather to help get to the root cause of this?

  4. shiftkey commented on May 30, 2018

    @shiftkey
    Member

    @michellepurcell there might be a way to workaround this issue while we work with the upstream project.

    Could you try running these command in a shell in your problem Git repository and attaching the output?

    $ git --version
    $ git -c http.sslBackend=schannel fetch
    $ git -c http.sslBackend=openssl fetch
    

    If the second command works, you should be able to switch Desktop over to use OpenSSL by running this command:

    $ git config --global http.sslBackend openssl
    
  5. shiftkey commented on May 30, 2018

    @shiftkey
    Member

    @fschutt please be patient while we investigate the issue.

    You too could try switching over to OpenSSL to see if that addresses the issue:

    $ git config --global http.sslBackend openssl
    
  6. fschutt commented on May 30, 2018

    @fschutt

    @shiftkey yep, that seems to fix it, thanks.

  7. michellepurcell commented on May 30, 2018

    @michellepurcell
    Author

    @shiftkey - Thanks Brendan. I get errors doing that:

    image

  8. niik commented on May 30, 2018

    @niik
    Member

    hey @michellepurcell, you'll need to CD into the directory of the repository you were having problems with first. As a shortcut you can click on the Repository menu in GitHub Desktop and then Open in Command Line and that should open a command line with the correct directory preselected.

  9. niik commented on May 30, 2018

    @niik
    Member

    @Reahreic is also experiencing this (see #4821) and they're on Windows 10 so this problem is not constrained to a particular version of Windows.

  10. niik commented on May 30, 2018

    @niik
    Member

    Just a quick update here. We're still investigating the best way to address this but preliminary findings indicate that this is a side-effect of curl/curl@8996300 (curl/curl#1325) wherein support is added to curl's schannel interface (Win32 SSL) that allows it to parse a "traditional" certificate bundle file.

    This allows curl to operate the same way on Windows as it does on macOS and Linux while leveraging the native Windows APIs for SSL/TLS support.

    Prior to this update the only way you could use a CA bundle file was to switch back to the openssl backend.

    Unfortunately this means that as long as either the Git config variable http.sslCAInfo or the environment variable GIT_SSL_CAINFO is set (even if set to an empty string) curl will bypass the normal Windows certificate chain validation and solely use the information in the ca bundle file.

    GitHub Desktop ships with a stock CA bundle file in order for the openssl backend to work properly but that also means that the schannel backend will always use the bundle file and never look at the Certificate Store.

    While we search for an optimal solution that will work for both backends I believe I have workaround for any users currently stuck and unable to push/pull/fetch from their enterprise instances.

    1. Open a command line prompt (click on the Repository menu in GitHub Desktop and then Open in Command Line).
    2. Copy and paste the following commands (and hit Enter after pasting to run them)
    • "%LocalAppData%\GitHubDesktop\app-1.2.1\resources\app\git\cmd\git" config --unset --system http.sslCAInfo
    • "%LocalAppData%\GitHubDesktop\app-1.2.1\resources\app\git\cmd\git" config --unset --global http.sslCAInfo
    • "%LocalAppData%\GitHubDesktop\app-1.2.1\resources\app\git\cmd\git" config --global http.sslBackend schannel

    This workaround will be reset the next time we ship an update but hopefully by then we will have solved it properly. Note that if you're using a beta version of GitHub Desktop you'll need to substitute the app-1.2.1 part in the paths with your version i.e. app-1.2.1-beta1.

  11. Reahreic commented on May 30, 2018

    @Reahreic

    @niik The workaround you posted is allowing me to sync and push again. (At lease for now) Thank you.

  12. nerdneha commented on May 30, 2018

    @nerdneha
    Contributor

    Hi @michellepurcell @fschutt, we just released 1.2.2 to address your and others' issues without requiring a workaround. Do you mind confirming that 1.2.2 addresses your issue?

  13. akrock commented on May 31, 2018

    @akrock

    @nerdneha

    Just did a fresh install of 1.2.2 and seeing:

    fatal: unable to access 'https://github.com/XXX/': schannel: failed to open CA file 'C:/Users/Andrew/AppData/Local/GitHubDesktop/app-1.2.2/resources/app/git/mingw64/bin/curl-ca-bundle.crt': No such file or directory
    

    referenced curl-ca-bundle.crt does not exist at the path specified on disk,

    [Edit] Manually adding the curl-ca-bundle.crt at this path does indeed fix the issue, but it was not installed/distributed with the 1.2.2 release.

  14. 28 remaining items

  15. ygor-lima commented on Jun 12, 2018

    @ygor-lima

    I removed the line @shiftkey has pointed, and it worked

    [http]
    sslCAInfo = C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt

  16. alvaromon commented on Jun 12, 2018

    @alvaromon

    @shiftkey im experience this same issue but C:/ProgramData/Git/config doesnt have the [http] line everyone is saying they removed for it to work

  17. Ribhasingh commented on Jun 12, 2018

    @Ribhasingh
  18. Ribhasingh commented on Jun 12, 2018

    @Ribhasingh
  19. Ribhasingh commented on Jun 12, 2018

    @Ribhasingh
  20. shiftkey commented on Jun 13, 2018

    @shiftkey
    Member

    @alvaromon please open a fresh issue and provide details about your setup, details about the errors you are seeing, and the diagnostic information I asked for above - it might not be the exact same issue.

  21. subsoap commented on Jun 14, 2018

    @subsoap

    Just posting to say I had the same issue after updating GitHub Desktop

    github fatal: unable to access schannel: failed to open CA file No such file or directory
    

    Deleting these lines in C:\ProgramData\Git\config as instructed seems to have solved it

    [http]
       sslCAinfo = /bin/curl-ca-bundle.crt
    
  22. dhimant1 commented on Jun 28, 2018

    @dhimant1

    On my Windows 10 Surface book, I had to remove the following line from the config file...
    sslCAInfo = C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt

  23. BelarminoVicenzo commented on Jun 29, 2018

    @BelarminoVicenzo

    I had the same error today when I download GHDesktop
    there is not file or folder C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt

    So I did what @shiftkey said, I delete those two lines.

    [http]
    sslCAInfo = C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt

  24. locked as resolved and limited conversation to collaborators on Aug 28, 2018
  25. unlocked this conversation on Sep 27, 2018
  26. JACK-ZHANG-coming commented on Mar 24, 2021

    @JACK-ZHANG-coming

    请问现在github destop最新版本对于这个问题已经解决了吗,我昨天下载了一个老版本的github destop也提示此问题,然后今天更新了一下,就没有出现了,其他的我也没做任何操作。

    May I ask if this problem has been solved in the latest version of GitHub destop? I downloaded an old version of GitHub destop yesterday, which also suggested this problem, and then updated it today, but it did not appear, and I did nothin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions