From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id BC3D32023D for ; Fri, 3 Mar 2017 08:16:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751431AbdCCIP4 (ORCPT ); Fri, 3 Mar 2017 03:15:56 -0500 Received: from cloud.peff.net ([104.130.231.41]:37789 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751323AbdCCIPy (ORCPT ); Fri, 3 Mar 2017 03:15:54 -0500 Received: (qmail 16417 invoked by uid 109); 3 Mar 2017 08:07:40 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.84) with SMTP; Fri, 03 Mar 2017 08:07:40 +0000 Received: (qmail 25648 invoked by uid 111); 3 Mar 2017 08:07:47 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.84) with SMTP; Fri, 03 Mar 2017 03:07:47 -0500 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Fri, 03 Mar 2017 03:07:38 -0500 Date: Fri, 3 Mar 2017 03:07:38 -0500 From: Jeff King To: Alessio Rocchi Cc: git@vger.kernel.org Subject: Re: git push - 401 unauthorized Message-ID: <20170303080738.ez3ztmev2vhlnjfu@sigill.intra.peff.net> References: <017901d28183$6fb72c60$4f258520$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <017901d28183$6fb72c60$4f258520$@gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Tue, Feb 07, 2017 at 09:47:45PM +0100, Alessio Rocchi wrote: > I try to push my commit on a private repository (which has been working > since about five years). It wasn't clear to me from your email, but did this work with a previous version of Git and is now broken? > me@superstar:/var/www/scorte$ git push --verbose > Pushing to http://isisenscorte:mypassword@mymachine/scorte_git > Getting pack list > Fetching remote heads... > refs/ > refs/tags/ > refs/heads/ > updating 'refs/heads/master' > from d9fd2e49cb0c32a6d8fddcff2954f04b4104d176 > to 23d8edfb7fa70bce44c21a7f93064c08a7288e23 > sending 6 objects > MOVE 33fcba80fdec82f43f995e5c693255da075358be failed, aborting (52/0) > MOVE 60e1a097d50fe62319413ed20129580cf175d1ca failed, aborting (52/0) > MOVE cfea41ef02f9aef5cecfbf7eac5a9e55975113f4 failed, aborting (52/0) > MOVE 3d87ab6ff7652f2b30e48612b70c8335d4625699 failed, aborting (52/0) > MOVE 4adb1b39e0446e0bfc3182258ff1cd7077871f7f failed, aborting (52/0) > Updating remote server info > fatal: git-http-push failed OK, that looks like the old dumb-http protocol. And you said here: > Permissions on the unauthorized object folders are 777 everywhere. My git > version is 1.7.0.4 on both client and server. Do you have any clue of this > strange behaviour? ...that you're using v1.7.0.4. There were tons of auth-related corner cases that have been fixed since then. Can you try a more recent version of Git on the client side (preferably v2.12.0)? The version on the server shouldn't matter; the 401 is generated by Apache, and as you are using the dumb-http protocol, git is not involved on the server side of the request at all. I'd also suggest that you move to the smart-http protocol on the server if possible. It's much more efficient, and the dumb-http code paths are not nearly as well tested, especially around things like authentication. Running "git help http-backend" gives some sample Apache config. -Peff