Since 2008 I use google code project hosting as repository for my college projects and backup. I used SVN as source control and didn’t had to much proble, except working, updating and committing changes in two distinct operating systems (Windows and Linux).
All went well until now.
Why? May you ask…
As you may know (or not) GoogleCode has for quite some time Git support for version control.
Well, this semester i have a course named “Internet Programming” where we will use git as source control and github as repository and so on. So far so good.
Since, by default, i always use source control, it doesn’t make since to me use multiple source control at the same time. There is no problem in doing that, but i’m a little lazy :-). Since i’m gonna use git for that course and i have source control within google code and google code has git support then let start using git in google code :-).
Make some sense.
Since in that same course we eventually gonna programming in ASP.NET MVC 3, we gonna need MS Visual Studio. Therefor, MS Windows. And we all know, MS Windows is not Unix and does not quite work in the same way.
I spent almost one day to found a way to update/commit/push/pull without having the annoince of giving the username and password. Thanks to Milton Keynes Blog and tips i made it.
This is how:
[ ]Step 1:
[ ]Step 2:
[ ]Step 3:
- make a new folder, with we gonna call home. I suggest unix structure: c:\home\your_user
- In Windows Enveriment Settings :Variable: HOME, Value: c:\home\your_user
- Make a new file in c:\home\your_user\_netrc. This file gonna keep your google code project credential. Yes is _netrc and not .netrc .
- Paste the follow line, making the necessary changes:
And the magic is made. Now i can push changes without insert username and password.