0

Yesterday, I installed SourceTree on my desktop that uses Windows 10 as OS. After I cloned my first repository (and committing the files) I tried pushing them, but it didn't work. I have kinda figured out the problem, but there seems no way to fix it.

The error log said that I needed to change:

git://github.com/USERNAME/REP.git

To:

https://github.com/USERNAME/REP.git

After I changed the path from git to https it automatically changed back to git. I have tried looking up a fix, but I just found posts of people explaining how to change the path.

EDIT: Added an image to show what happends when I try changing it.

Biffen
  • 6,249
  • 6
  • 28
  • 36

2 Answers2

0

Try removing your remote and then adding it again.

git remote remove origin
git remote add origin https://github.com/justLars701/701.git
ilooner
  • 2,480
  • 15
  • 32
  • Is there anything hardcoded in your gitconfig? Instructions on how to find it are here: https://stackoverflow.com/questions/2114111/where-does-git-config-global-get-written-to – ilooner Feb 12 '18 at 05:18
  • I have found the issue: https://imgur.com/CmaGiIX. Thank you so much for your help! – Gouden Enderoog Feb 12 '18 at 13:20
0

I have fixed the issue thanks to ilooner.

When I took a look at my config file using git config --list --show-origin I saw that a weird configuration was set that changed https://github.com to git://github.com automatically. https://i.stack.imgur.com/xGcZn.jpg

After that I manually went to my gitconfig file that was located in my C:/Users/USER and removed the part that I surrounded by red in the provided image.

After that I went ahead and changed the remote path to https://

Now it worked