git clone always clone the same repo no matter what url I provide


No matter what git clone url I use, git always clones one of my old projects from bitbucket. For example when I do something like this:

git clone

instead of cloning from heroku, I get one of my projects (always the same project) from my bitbucket repository.
I have tried to remove all the keys associated with the ssh, and create the new ones, but whatever I do the result is the same. Please help. Thank you
Please let me know if I need to provide more information.


I had exactly the same problem. It didn’t matter which repo I tried to clone, it always cloned the same repo each time. Even reinstalling git with purge and autoremove did not help.

Eventually I located my .gitconfig file in my home directory and found the following settings:

    email = <my_email>
    name = Tim Bushell
[remote "origin"]
    url =<name_of_same_repo>.git

I edited this file to:

    email = <my_email>
    name = Tim Bushell

… and I was able to clone any repo once again.

I’m not clear how the .gitconfig gained this setting.

Answered By – Timothy Bushell

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published