coding and day dreaming

Using git and .netrc

Today I was initializing another google code project git repo. I use .netrc to store the googlecode password.

Clone – Push – Error

fatal: remote error: Invalid username/password.
You may need to use your generated password; see

I went back and check on my other googlecode git repo, everything is still working fine, so it can’t be a problem with the password/.netrc. Eventually I realize that git has initialized my .git/config with

[remote "origin"]
 fetch = +refs/heads/*:refs/remotes/origin/*
 url =

Instead of

[remote "origin"]
 fetch = +refs/heads/*:refs/remotes/origin/*
 url =

Removing the username from git config fix the issue.


One response to “Using git and .netrc

  1. Pingback: Getting Started with Git on Google Code | Monkeyologist

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: