From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id AF4HGIzHhF+kPQAA0tVLHw (envelope-from ) for ; Mon, 12 Oct 2020 21:15:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id SDLRE4zHhF/JXQAAbx9fmQ (envelope-from ) for ; Mon, 12 Oct 2020 21:15:56 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 697B894014A for ; Mon, 12 Oct 2020 21:15:55 +0000 (UTC) Received: from localhost ([::1]:45298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kS5Af-0000H5-LH for larch@yhetil.org; Mon, 12 Oct 2020 17:15:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kS55z-0005pf-A1 for guix-patches@gnu.org; Mon, 12 Oct 2020 17:11:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60785) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kS55z-0006yY-0k for guix-patches@gnu.org; Mon, 12 Oct 2020 17:11:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kS55y-00065Q-Sn for guix-patches@gnu.org; Mon, 12 Oct 2020 17:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43968] [PATCH 3/3] git: Support HTTP and HTTPS proxies. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Oct 2020 21:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43968 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43968@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 43968-submit@debbugs.gnu.org id=B43968.160253702023327 (code B ref 43968); Mon, 12 Oct 2020 21:11:02 +0000 Received: (at 43968) by debbugs.gnu.org; 12 Oct 2020 21:10:20 +0000 Received: from localhost ([127.0.0.1]:44094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kS55I-000645-Ht for submit@debbugs.gnu.org; Mon, 12 Oct 2020 17:10:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kS55C-00063W-1Q for 43968@debbugs.gnu.org; Mon, 12 Oct 2020 17:10:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50498) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kS556-0006ii-Rh; Mon, 12 Oct 2020 17:10:08 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54554 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kS556-0005SP-0y; Mon, 12 Oct 2020 17:10:08 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Mon, 12 Oct 2020 23:09:55 +0200 Message-Id: <20201012210955.8753-3-ludo@gnu.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012210955.8753-1-ludo@gnu.org> References: <20201012210955.8753-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 4.99 X-TUID: qThkBw+qKZw7 This allows 'guix pull' and similar to fetch code over a proxy. * guix/git.scm (make-default-fetch-options): Pass #:proxy-url. --- guix/git.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/guix/git.scm b/guix/git.scm index b81a011443..364b4997ae 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -161,11 +161,14 @@ the 'SSL_CERT_FILE' and 'SSL_CERT_DIR' environment variables." (define (make-default-fetch-options) "Return the default fetch options." (let ((auth-method (%make-auth-ssh-agent))) - ;; The #:transfer-progress option appeared in Guile-Git 0.4.0. Omit it - ;; when using an older version. + ;; The #:transfer-progress and #:proxy-url options appeared in Guile-Git + ;; 0.4.0. Omit them when using an older version. (catch 'wrong-number-of-args (lambda () (make-fetch-options auth-method + ;; Guile-Git doesn't distinguish between these. + #:proxy-url (or (getenv "http_proxy") + (getenv "https_proxy")) #:transfer-progress (and (isatty? (current-error-port)) show-progress))) -- 2.28.0