1

I had trouble pushing to GitHub so I updated git for Windows 10. according to the GUI I downloaded I have the latest version and I can push to GitHub from it. However I don't normally use this and prefer the command line. The command line still says i have the old version of git and is not detecting the newly installed version.

Why is it not recognizing it and how can get the command prompt to recognize the new version? At the moment I get an error when trying to push via the command prompt.

fatal: unable to access 'https://github.com/owen358/FrogBlog.git/': error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
tripleee
  • 139,311
  • 24
  • 207
  • 268
Owen
  • 321
  • 4
  • 15
  • Which is "the command line", are you using Bash in the Ubuntu subsystem or the godforsaken native command line? How exactly are you establishing which version you are running? – tripleee Feb 26 '18 at 07:53
  • i think its the godforsaken one. i just type git --version and get git version 1.9.4.msysgit.2. it also states it when you open it all the versions of git, ruby and rails. i also have git bash but it is detecting the same version – Owen Feb 26 '18 at 08:11
  • https://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-the-windows-command-line tells you how to find out which path `git` is being resolved to in `cmd`. I'm guessing you need to fix your `PATH` so that the version you installed just now is earlier in the `PATH`. This is a very common FAQ. – tripleee Feb 26 '18 at 08:20
  • Are you sure? To me it sounds you have tsl/ssl protocol issues? How you are pushing to your repository? By ssh or http? – kuskmen Feb 26 '18 at 08:21
  • type `where ` to see what it is finding. Use System Properties Dialog to fix your path. Type `path` to see your path. – ACatInLove Feb 26 '18 at 08:42
  • @kuskmen you're right. It is a protocol issue based on an old version of git. The OP seems to be struggling as to why the error is still happening after updating git. – evolutionxbox Feb 26 '18 at 09:15
  • @kuskmen i push from the command line usually with the command 'git push origin master' i dont know what pushing by ssh or http means though. – Owen Feb 26 '18 at 10:28
  • @ACatInLove what is 'nameofgitprogram'? i don't know what i should replace this with or how to find it – Owen Feb 26 '18 at 10:31
  • I don't use Git so I don't know the name of the specific program. But these problems are usually the result of an old path. – ACatInLove Feb 26 '18 at 10:35
  • `where git`. The other solution is to update the PATH and put near the beginning the good path towards git – Philippe Feb 26 '18 at 11:37
  • i did 'where git' and got the following: C:\Sites>where git C:\RailsInstaller\Git\cmd\git.exe C:\Program Files\Git\cmd\git.exe What do i do now? how to change the PATH? – Owen Feb 26 '18 at 12:36

2 Answers2

0

It sounds like your system PATH was not updated correctly. If you have installed the newest version of git, make sure you uninstall the old version. It's possible that this by itself could fix your issue (by removing the old PATH variable in your PATH).

If this does not fix the issue, here is how you can append the PATH variable. If a program's location is not in PATH, command-prompt doesn't know where to find it.

Major
  • 482
  • 5
  • 15
-2

git config --global url.git://github.com/.insteadOf https://github.com/

Hope that helps!

joseph oun
  • 135
  • 1
  • 7