git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: http.receivepack==false && authenticated => Service not enabled

From
RRobert <yayooo@gmail.com>
Date
May 11, 2011, 10:26 UTC
Message-ID
<BANLkTi=14G2WvfoHfhJn_u_NDHnL+6cqCQ@mail.gmail.com>
In-Reply-To
<BANLkTikZdvW1ptVNBiJpCX7jdrqxq=CaDA@mail.gmail.com>
Sorry!It is my wrong ! It is not a bug !
On Wed, May 11, 2011 at 10:21, Robert <yayooo@gmail.com> wrote:
Show 28 quoted lines
> Even a authenticated  user can not push when http.receivepack set to false.
> when
> git config http.receivepack false
> svc->enabled was set to 0 not -1
> so we should initialize with 0 not -1
>
> --- http-backend.c      Thu May  5 01:16:14 2011
> +++ http-backend.c   Wed May 11 09:57:52 2011
> @@ -23,7 +23,7 @@
>
>  static struct rpc_service rpc_service[] = {
>        { "upload-pack", "uploadpack", 1 },
> -       { "receive-pack", "receivepack", -1 },
> +       { "receive-pack", "receivepack", 0 },
>  };
>
>  static struct string_list *get_parameters(void)
> @@ -260,8 +260,8 @@
>        if (!svc)
>                forbidden("Unsupported service: '%s'", name);
>
> -       if (svc->enabled < 0) {
>                const char *user = getenv("REMOTE_USER");
> +       if (!svc->enabled) {
>                svc->enabled = (user && *user) ? 1 : 0;
>        }
>        if (!svc->enabled)
>
Previous: Robert
Message 2 of 2 in “http.receivepack==false && authenticated => Service not enabled”
  1. RobertMay 11, 2011
  2. RobertMay 11, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.