git-core requires curl but doesn't download it

Bug #52711 reported by James Purser on 2006-07-11
40
Affects Status Importance Assigned to Milestone
git-core (Debian)
Fix Released
Unknown
git-core (Ubuntu)
Undecided
Unassigned
Nominated for Hardy by Michael B. Trausch

Bug Description

The git-clone command within git-core requires curl to get from various sources. However the package seems to only recommend rather than require curl when apt-getting. Could this be fixed please?

Mark Reitblatt (mark-reitblatt) wrote :

This has already been reported and closed by Debian:

"Hi, fetching through http is just one part of git core, and not
necessarily used by all users. That's why the git-core package
Recommends: curl, most of it works just fine without curl being
installed."

That seems correct behavior. Hopefully this won't be an issue for too long since we are enabling --install-recommends as the default in edgy.

I'm gonna add a link to the Debian bug and close this here.

Thanks for reporting it!

Changed in git-core:
status: Unconfirmed → Rejected
Changed in git-core:
status: Unknown → Fix Released
Denis Moyogo Jacquerye (moyogo) wrote :

Could the fixed release be used instead of the broken one?
This bug is still present on feisty.

The bug is still present on Gutsy

Changed in git-core:
status: Invalid → Incomplete
Jerone Young (jerone) wrote :

This bug is still present in hardy. Why has curl not been added as a depency for git. It is required for using "git clone".

When you use it you get :
jerone@laptop:~$ git clone http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-hardy.git;a=tree;h=f7730db16b82366d72fa977a1409bbfce71e909c;hb=f7730db16b82366d72fa977a1409bbfce71e909c
Initialized empty Git repository in /home/jerone/ubuntu-hardy/.git/
/usr/bin/git-clone: 374: curl: not found

Jerone Young (jerone) on 2008-04-03
Changed in git-core:
status: Incomplete → New
Emil Sit (emilsit) wrote :

When building git from source, its configure script checks for the presence of
curl on the system being built and configures git-clone (and other git
commands) to avoid using curl if curl is unavailable. (see, e.g.,
git-clone.sh:359 from the source which reads:

    if test -z "@@NO_CURL@@"
    then
     clone_dumb_http "$repo" "$D"
    else
     die "http transport not supported, rebuild Git with curl support"
    fi

In the current Ubuntu package (1:1.5.4.3-1ubuntu1), that line reads

    if test -z "",

presumably b/c the package was built on a system with curl installed. Run-time
detection seems out (transport.c also has curl-optional components) so perhaps,
like gitk, all the binaries/scripts that require curl support can be split out
into a separate package. git-clone-curl and git-clone-nocurl could be, for
example, selected between via alternatives.

Changed in git-core:
status: New → Confirmed
Michael B. Trausch (mtrausch) wrote :

Debdiff to fix this; successfully tested locally. Will subscribe sponsors momentarily.

Daniel Holbach (dholbach) wrote :

Ben: can you please take a look at it?

Daniel Hahler (blueyed) wrote :

As I've said in https://bugs.edge.launchpad.net/ubuntu/+source/git-core/+bug/178603/comments/2 already (and as the Debian bug states):

Fetching through http is just one part of git core, and not necessarily used by all users. That's why the git-core package Recommends: curl, most of it works just fine without curl being installed.

That's what Recommends is meant for and the error message in case of failure is clear enough IMHO:
  /usr/bin/git-clone: 356: curl: not found

The most common way to use git is the git protocol itself, and for this curl isn't required.

  • unnamed Edit (189 bytes, application/pgp-signature; name=signature.asc)

On Mon, 2008-04-14 at 19:54 +0000, Daniel Hahler wrote:
> Fetching through http is just one part of git core, and not
> necessarily
> used by all users. That's why the git-core package Recommends: curl,
> most of it works just fine without curl being installed.
>
> That's what Recommends is meant for and the error message in case of
> failure is clear enough IMHO:
> /usr/bin/git-clone: 356: curl: not found
>
> The most common way to use git is the git protocol itself, and for
> this
> curl isn't required.

Only problem is that it is required for git-clone from an http://
source.

That is a very common use-case. Hence the promotion to Depends really
is necessary; I would not have stumbled upon this unless I had run into
the problem myself.

--
Michael B. Trausch <email address hidden>
home: 404-592-5746, 1 www.trausch.us
cell: 678-522-7934 im: <email address hidden>, jabber
Ubuntu Unofficial Backports Project: http://backports.trausch.us/

Emil Sit (emilsit) wrote :

On Tue, 15 April 2008 at 04:27 (-0000), Michael B. Trausch wrote:
> That is a very common use-case. Hence the promotion to Depends really
> is necessary

How do you feel about my proposal to split this functionality off
into a separate package? Run-time detection of curl in git upstream
would also be a viable option (though perhaps not at this point in
the release cycle?).

I think the current error message could be a bit friendlier though
arguably anyone using git clone can probably figure out that if you're
missing curl, you need to install it.

--
Emil Sit / http://www.emilsit.net/

Michael B. Trausch (mtrausch) wrote :
  • unnamed Edit (189 bytes, application/pgp-signature; name=signature.asc)

On Tue, 2008-04-15 at 11:42 +0000, Emil Sit wrote:
> I think the current error message could be a bit friendlier though
> arguably anyone using git clone can probably figure out that if you're
> missing curl, you need to install it.

That's not a reason to keep it broken. I have never liked having to
'sudo apt-get' more than once to have a package be _functional_.

Fact is, git-clone uses curl. The dependency is added for a reason (and
one which is very easily verifiable). If the dependency were not
needed, I would argue that this bug would be invalid.

If I _have_ to 'sudo apt-get' something _else_, just so that the package
I originally installed works, this is a broken dependency, not merely
"Oh, you didn't install the suggests." (If I installed the Suggests: or
the Recommends: for every package on my system, I'd probably have the
entire archive installed.)

In this case, git-clone is _broken_ without curl installed. It needs to
be there. Is there any more proof than that necessary?

--
Michael B. Trausch <email address hidden>
home: 404-592-5746, 1 www.trausch.us
cell: 678-522-7934 im: <email address hidden>, jabber
Ubuntu Unofficial Backports Project: http://backports.trausch.us/

Flávio Etrusco (etrusco) wrote :

Let me just repeat the git-clone is broken (without curl) only for _http_ repositories.
I too want "curl" to be declared on Depends, as in my experience http is the most common setup, but I really can't tell for sure...

Jerone Young (jerone) wrote :

What shocks me is how non user friendly all this is. Just ridiculous there is even an argument over this.

For any other package. You install all the dependencies so that package is "fully functional". NOT...oh it does something, but you need to install this other thing ... but oh you had no idea you where going to need this since nothing really told you (sorry we do not all read a debs recommended list .. why because the functionality in the package should work... synaptic doesn't pop up a recommended list before installing something).

There are actually cases where this becomes a problem. As some use workstations that they do not have access to install things. So if they tell the admin to install git-core and they need to pull an http tree, it going then another hassle to install curl too. But this is just one case. What about automated scripts and such...where honestly if git-clone is there it should work .. right?

Most the git trees I push and pull from are http which is why I hit this issue.

Michael B. Trausch (mtrausch) wrote :

I don't know why this was not included in 8.04, but it should be fixed for 8.04.1, so I've nominated it.

Fernando Muñoz (fmunozs) wrote :

This is the first time I'm using git, and I came across this issue. I would say that curl should be installed when installing git-core.

Alexander Sack (asac) wrote :

git-core depends on libcurl-gnutls and doesnt recommend curl at all. Thus, I assume that this bug is now fixed. If you dont think so, please reopen.

Changed in git-core:
status: Confirmed → Invalid
Michael B. Trausch (mtrausch) wrote :

On Tue, Sep 16, 2008 at 10:44:36AM -0000, Alexander Sack wrote:
> git-core depends on libcurl-gnutls and doesnt recommend curl at all.
> Thus, I assume that this bug is now fixed. If you dont think so, please
> reopen.
>
> ** Changed in: git-core (Ubuntu)
> Status: Confirmed => Invalid

The version of git-core in Intrepid now pulls http repositories without
the need for the external 'curl' command. I tested this out and it is
functional, so changing the status to reflect that.

 status fixreleased

--
My sigfile ran away and is on hiatus.

Changed in git-core:
status: Invalid → Fix Released
Steve Huff (shuff) wrote :

asac: This bug still affects 8.04.4 LTS systems, on which the current version of git-core is 1.5.4.3-1ubuntu2.1. That version of git is old enough that it does *not* link against libcurl, but rather calls the curl executable from a shell script, and thus it seems to me that the git-core package distributed through hardy-updates still needs this fix.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.