author: Krasimir Tsonev

Hi there, I'm . Senior front-end engineer with over 13 years of experience. I write, speak and occasionally code stuff. Follow me on Twitter, GitHub, Facebook or LinkedIn

Accessing remote Git server under windows

Let's say that you have an access to remote server which has Git installed. A trivial case if you use unix based OS. But what if you use Windows :)
First of all I'll suggest to install GitHub for Windows. It comes with a nice GitShell, which I'm using to manage my repositories under Windows. So, the first thing you usually do is to clone your project:
  git clone 
In my case everything works ok except the fact that I wasn't able to push. It was like that, because I clone the repository via http instead to use https. Once I fix that I typed:
  git remote -v
and the result was something like:
  origin  https:///.git/ (fetch)
  origin  https:///.git/ (push)
So far, so good. Now I tried to push my changes with:
  git push origin master
And I got:
  error: Cannot access URL , return code 22
  fatal: git-http-push failed
I was using https, but probably the server can't authorize me. So, the solution was to change my remotes. I.e. to include my server credentials inside the urls like that:
  git remote set-url origin https://:@/.git
If you enjoy this post, share it on Twitter, Facebook or LinkedIn. Or maybe comment below: