Google Code, Git Authentication on Windows

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:

https:[email protected]/p/project-name/

What you need to do is append the password to your Google username with a leading colon.

https://google-username:[email protected]/p/project-name/

You’ll then be able to authenticate as required. Stupidly simple fix for an equally stupid problem.

Bob Hensley

IT Manager | Webmaster | Social Media Strategist | SEO Specialist | Copywriter at Fairfield's Auto Group
Bob Hensley is an IT Manager, Webmaster and all-around advertising guy by day; database theory junkie by night.Born and raised in New England, he lives just a couple hours outside of Boston with his lovely wife and one year old son.He's a technologist, and thoroughly enjoys finding new ways to use technology to better efficiency and work flows.

Latest posts by Bob Hensley (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *

*