I’m not typically a Windows user; I especially dislike having to do my development on Windows. But there are times I just can’t avoid it. And today was one of those days. I set up Msysgit and created a new project on Google Code, using Git as the version control choice. Then I ran into a brick wall for a little while. What should have been stupidly simple on my Linux box (through the use of a .netrc file) turned out to be a pain on Windows: authenticating with Google Code to push my local repo. Msysgit (and even TortoiseGit, I tried that too) refused to ask me for my password. So every attempt I made resulted in an authentication error. It would tell me I should try using my Google Code generated password. Well no shit. Anyways, I failed to find an answer on Google that worked. But I inevitably fixed the problem on my own. Here’s how: Enter the .git directory within your local repo (will be hidden). Open up the config file in your text editor of choice. Under the [remote “origin”] section you’ll see a field for url. This URL should be in the format of:
What you need to do is append the password to your Google username with a leading colon.
You’ll then be able to authenticate as required. Stupidly simple fix for an equally stupid problem.