Git button initial brake does not work

Although I could perform my changes locally, I cannot click on the original wizard

I ran

$ git remote add origin git@github.com:username/test.git 

I get

 fatal: remote origin already exists. 

I ran

 $ git push -u origin master 

I get

 ERROR: Repository not found. fatal: The remote end hung up unexpectedly 

What happened to this?

+4
git github
Apr 09 '12 at 2:00
source share
2 answers

2 way to do it
first: -

  git remote set-url <name> <newurl> 

example: -

 git remote set-url origin git@github.com:username/test.git 

second: -

What you need to do is change the "origin" setting. You are editing the .git / config file at the root of your project, which might look something like this:

 ... [remote "origin"] url = git://user@dev.foo.com/git/repos/path fetch = +refs/heads/*:refs/remotes/origin/* ... 

or if your 'remote' is actually local:

 ... [remote "origin"] url = /path/to/repos/on/this/machine fetch = +refs/heads/*:refs/remotes/origin/* ... 

All you have to do is edit this file with your favorite editor and change the url = setting to a new location. Assuming the new repository is configured correctly and you have the correct URL, you will happily push and pull to and from the new remote location.

+5
Apr 09 '12 at 6:11
source share

There seems to be a bad entry for origin in your configuration file.

Modify the repository file .git/config to modify it; the format is clear enough, but post its contents if you have problems.

+1
Apr 09 2018-12-12T00:
source share



All Articles