-1

I'm trying to clone my private repo from the remote host and it works on every other computer but doesn't work for me for some reason.

I have already tried,

git remote rm origin

and

git remote add origin {{url for git repo}}

but no luck. Is there a way to completely reset the Git configurations on my local computer?

random
  • 9,774
  • 10
  • 66
  • 83
CoderKK
  • 351
  • 1
  • 7
  • 18
  • Please tell us what you're actually trying to do. Your question doesn't make sense, cloning and remotes have nothing to do with each other. – user229044 Dec 31 '14 at 03:33

2 Answers2

1

git clone has nothing to do with git remote. Remotes are only involved after you have already successfully cloned a repo.

If you're trying to clone a repo, you need git clone <url for git repo>. If that isn't working, stop playing with git remote, because that has nothing to do with cloning repositories.

There is no configuration setting you can change here, you simply need to figure out what the real URL for your repository is and run git clone <url>.

user229044
  • 232,980
  • 40
  • 330
  • 338
  • actually thats what i did in the first place. then lots of online tutorials directed me to remove the origin which i did. but still i get repository not found error when i try to clone it. – CoderKK Dec 31 '14 at 03:33
  • You misunderstood those tutorials. You cannot even **do** `git remote ` until *after* you've successfully cloned a repo. `git remote` is for managing the remotes of a cloned repository. Until you're actually inside a clone repository, you have no use for `git remote`. – user229044 Dec 31 '14 at 03:34
0

This can be done via command line via git remote rm origin. But here's an alternative:

In the .git folder inside your repository you will find a file called config, which will contain something like this:

[remote "origin"]
    url = https://github.com/Acme/repo.git
    fetch = +refs/heads/*:refs/remotes/origin/*

Just erase this section and after this just run: git remote add <your_url>

avenet
  • 2,894
  • 1
  • 19
  • 26