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
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug

Sign in to add a comment

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

Reported by, 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 --repo-url

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
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,

Comment 1 by, Jul 14 2014

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

Comment 2 by, Jul 15 2014

First, it needs to be changed here:

Then here:

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

Comment 3 by, Nov 16 2017

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