Opened 8 years ago

Closed 7 years ago

#50467 closed defect (duplicate)

ansible @2.0.0.2.1_0 Git clone failed - SSL certificate problem: Couldn't understand the server certificate format

Reported by: breun (Nils Breunese) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: adfernandes (Andrew Fernandes), blair (Blair Zajac), steenzout (Pedro Salgado)
Port: ansible

Description

Running sudo port install ansible on my OS X 10.11.3 installation fails with the following lines in the log:

:info:fetch fatal: unable to access 'https://github.com/ansible/ansible.git/': SSL certificate problem: Couldn't understand the server certificate format
:info:fetch Command failed: /usr/bin/git clone -q https://github.com/ansible/ansible.git /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_ansible/ansible/work/ansible-2.0.0.2-1 2>&1
:info:fetch Exit code: 128
:error:fetch org.macports.fetch for port ansible returned: Git clone failed
:debug:fetch Error code: NONE
:debug:fetch Backtrace: Git clone failed
    while executing
"gitfetch"
    (procedure "portfetch::fetch_main" line 14)
    invoked from within
"portfetch::fetch_main org.macports.fetch"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"

I have tried installed the git port and trying again, but that doesn't make a difference. The log mentions using /usr/bin/git either way, so I didn't expect it to.

Manually cloning the Ansible Git repository by running git clone https://github.com/ansible/ansible.git works fine.

Attachments (1)

main.log (68.2 KB) - added by breun (Nils Breunese) 8 years ago.

Download all attachments as: .zip

Change History (11)

Changed 8 years ago by breun (Nils Breunese)

Attachment: main.log added

comment:1 Changed 8 years ago by adfernandes (Andrew Fernandes)

Do you have all of apple's latest updates installed? If you're using /usr/bin/git you're using Apple's certificate store.

SSL Labs' tests for github are here.

With your manual git clone, are you using MacPorts' git or the system git? Could you please try both?

(This really seems like a MacPorts issue, not the ansible port, BTW!)

comment:2 Changed 8 years ago by adfernandes (Andrew Fernandes)

There's also this (via google) from GitHub re SSL certificate checks.

comment:3 Changed 8 years ago by breun (Nils Breunese)

Yes, this is on OS X 10.11.3 with all updates applied. I'm not choosing the git client myself, but I just see in the build log that /usr/bin/git is being used. I can clone the ansible git repository using both /usr/bin/git and /opt/local/bin/git without any problems:

~/tmp1 $ /usr/bin/git clone https://github.com/ansible/ansible.git
Cloning into 'ansible'...
remote: Counting objects: 107584, done.
remote: Compressing objects: 100% (70/70), done.
remote: Total 107584 (delta 35), reused 0 (delta 0), pack-reused 107506
Receiving objects: 100% (107584/107584), 37.61 MiB | 935.00 KiB/s, done.
Resolving deltas: 100% (64374/64374), done.
Checking connectivity... done.
~/tmp2 $ /opt/local/bin/git clone https://github.com/ansible/ansible.git
Cloning into 'ansible'...
remote: Counting objects: 107584, done.
remote: Compressing objects: 100% (70/70), done.
remote: Total 107584 (delta 35), reused 0 (delta 0), pack-reused 107506
Receiving objects: 100% (107584/107584), 37.61 MiB | 591.00 KiB/s, done.
Resolving deltas: 100% (64374/64374), done.
Checking connectivity... done.

But when I run sudo port install ansible I get an error about the SSL certificate in the build log.

Last edited 8 years ago by breun (Nils Breunese) (previous) (diff)

comment:4 Changed 8 years ago by adfernandes (Andrew Fernandes)

Huh. I don't even know how that's possible.

Seems similar to #49539.

Do you have any git plugins installed?

It almost looks like there's some sort of proxy screwing around with the SSL handshake, but why it would differ at the command line vs port I have no idea.

comment:5 Changed 8 years ago by breun (Nils Breunese)

Sadly #49539 doesn't have a solution, but was solved by switching to another port.

I didn't know git had support for plugins. I don't know how to check for them, but I'm pretty sure I've never installed anything like that.

comment:6 Changed 8 years ago by breun (Nils Breunese)

I have created #50469 to report this issue against MacPorts base.

comment:7 Changed 8 years ago by nhojpatrick (John Patrick)

Any update as I would like to install ansible using macports.

comment:8 Changed 7 years ago by breun (Nils Breunese)

This issue still exists for me using macOS Sierra 10.12.1 with Git 2.9.3 and MacPorts 2.3.5:

~ $ which git
/usr/bin/git
~ $ git --version
git version 2.9.3 (Apple Git-75)
~ $ sudo port -dv fetch ansible
DEBUG: Copying /Users/breun/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences
DEBUG: Changing to port directory: /Users/breun/Projects/macports-ports/sysutils/ansible
DEBUG: OS darwin/16.1.0 (Mac OS X 10.12) arch i386
DEBUG: Re-registering default for build.cmd
DEBUG: Re-registering default for destroot.cmd
DEBUG: Re-registering default for destroot.destdir
DEBUG: Sourcing PortGroup python 1.0 from /Users/breun/Projects/macports-ports/_resources/port1.0/group/python-1.0.tcl
DEBUG: Sourcing PortGroup github 1.0 from /Users/breun/Projects/macports-ports/_resources/port1.0/group/github-1.0.tcl
DEBUG: only one arch supported, so not adding the default universal variant
DEBUG: Running callback portconfigure::add_automatic_compiler_dependencies
DEBUG: Preferred compilers: clang macports-clang-3.8 macports-clang-3.7
DEBUG: Finished running callback portconfigure::add_automatic_compiler_dependencies
DEBUG: Running callback portbuild::add_automatic_buildsystem_dependencies
DEBUG: Finished running callback portbuild::add_automatic_buildsystem_dependencies
DEBUG: Starting logging for ansible
DEBUG: Found Dependency: path: /usr/bin filename: git regex: ^git$
--->  Computing dependencies for ansible
DEBUG: Found Dependency: path: /usr/bin filename: git regex: ^git$
DEBUG: Searching for dependency: git
DEBUG: Didn't find receipt, going to depspec regex for: git
DEBUG: Found Dependency: path: /usr/bin filename: git regex: ^git$
DEBUG: Executing org.macports.main (ansible)
DEBUG: fetch phase started at Sat Nov 19 12:57:03 CET 2016
--->  Fetching distfiles for ansible
DEBUG: Executing org.macports.fetch (ansible)
DEBUG: Executing: /usr/bin/git clone -q https://github.com/ansible/ansible.git /opt/local/var/macports/build/_Users_breun_Projects_macports-ports_sysutils_ansible/ansible/work/ansible-2.1.2.0-1 2>&1
fatal: unable to access 'https://github.com/ansible/ansible.git/': SSL certificate problem: Couldn't understand the server certificate format
Command failed: /usr/bin/git clone -q https://github.com/ansible/ansible.git /opt/local/var/macports/build/_Users_breun_Projects_macports-ports_sysutils_ansible/ansible/work/ansible-2.1.2.0-1 2>&1
Exit code: 128
Error: org.macports.fetch for port ansible returned: Git clone failed
DEBUG: Error code: NONE
DEBUG: Backtrace: Git clone failed
    while executing
"gitfetch"
    (procedure "portfetch::fetch_main" line 14)
    invoked from within
"portfetch::fetch_main org.macports.fetch"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
Warning: targets not executed for ansible: org.macports.fetch
Please see the log file for port ansible for details:
    /opt/local/var/macports/logs/_Users_breun_Projects_macports-ports_sysutils_ansible/ansible/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port ansible failed

comment:9 Changed 7 years ago by breun (Nils Breunese)

I've found that it does work in a separate fresh installation of MacPorts 2.3.5: https://trac.macports.org/ticket/50469#comment:42 I don't know what's wrong with my installation in /opt/local yet, but I might just throw it out and start fresh.

comment:10 Changed 7 years ago by mf2k (Frank Schima)

Resolution: duplicate
Status: newclosed

Calling this a duplicate of #50469.

Note: See TracTickets for help on using tickets.