New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment
link

Issue 393715: repo init silently ignores ~/.netrc if the file is readable to others

Reported by amstan@chromium.org, Jul 14 2014 Project Member

Issue description

Version: repo version v1.12.13-cr2
OS: Ubuntu 14.04 trusty

What steps will reproduce the problem?
1. chmod 640 .netrc
2. repo init -u https://chromium.googlesource.com/chromiumos/manifest.git --repo-url https://chromium.googlesource.com/external/repo.git

What is the expected output?
Some indication that the .netrc is too permissive.
Example: warning: netrc ~/.netrc access too permissive: access permissions must restrict access to only the owner (/usr/local/google/home/amstan/.netrc, line 1)

What do you see instead?
fatal: Cannot get https://chromium.googlesource.com/a/external/repo.git/clone.bundle
fatal: HTTP error 401

I did a small change to help others in the future. Not sure where I can commit it:
diff --git a/repo b/repo
index c617e5f..5d22450 100755
--- a/repo
+++ b/repo
@@ -434,8 +434,8 @@ def _InitHttp():
       p = n.hosts[host]
       mgr.add_password(p[1], 'http://%s/'  % host, p[0], p[2])
       mgr.add_password(p[1], 'https://%s/' % host, p[0], p[2])
-  except:
-    pass
+  except Exception as e:
+    print "warning: netrc %s" % e,
   handlers.append(urllib.request.HTTPBasicAuthHandler(mgr))
   handlers.append(urllib.request.HTTPDigestAuthHandler(mgr))
 

Comment 1 by dtor@google.com, Jul 14 2014

This is similar to 376546. The fix there is a bit more verbose which is helpful.

Comment 2 by szager@google.com, Jul 15 2014

First, it needs to be changed here:

https://chromium.googlesource.com/chromium/tools/depot_tools/+/master/repo

Then here:

https://chromium.googlesource.com/external/repo/+/stable/repo

... and a new signed tag created in the second repository.

Comment 3 by timbrown@chromium.org, Nov 16 2017

Cc: thomasanderson@chromium.org timbrown@chromium.org
Status: WontFix (was: Untriaged)
This bug has not been touched in over 2 years. In order to help us setup a more active triage process for new incoming bugs, we are closing these old, likely obsolete, bugs.

If this bug is still relevant to you, we want to know about it! Please confirm the bug is still reproducible, and reopen/add a comment.

Sign in to add a comment