Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EGIT does not add origin github remote

Tags:

git

github

egit

Why if I create a local repository, then create a github repository and then add that as remote, I commit to local and then I push to remote, but I have no ability to pull from remote to local?

If I add remote using git bash all is well remote is properly configured and I can pull, and push and fetch to upstream but if I do it thru the EGIT wizard it never works for local repositories that get pushed and then get fetched and merged... Any clues?

Here is the log post:

eclipse.buildId=I20110613-1736 java.version=1.6.0_26 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product

Error Tue Sep 20 10:40:05 BST 2011 The current branch is not configured for pull

org.eclipse.jgit.api.errors.InvalidConfigurationException: No value for key branch.master.merge found in configuration at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:189) at org.eclipse.egit.core.op.PullOperation$1.run(PullOperation.java:82) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2326) at org.eclipse.egit.core.op.PullOperation.execute(PullOperation.java:104) at org.eclipse.egit.ui.internal.pull.PullOperationUI.execute(PullOperationUI.java:115) at org.eclipse.egit.ui.internal.pull.PullOperationUI$1.run(PullOperationUI.java:90) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

like image 443
Astronaut Avatar asked Sep 16 '11 18:09

Astronaut


People also ask

How do I initialize git and add remote origin?

Create a new, empty Git repository on your remote server. Obtain the git remote add URL for the remote repository and add credentials if needed. Run the git remote add origin command from your local repository with the --set-upstream and the name of the active branch to push.

How do I find my GitHub remote origin?

If you've copied a project from Github, it already has an origin. You can view that origin with the command git remote -v, which will list the URL of the remote repo.

What is git remote add origin command?

To add a new remote, use the git remote add command on the terminal, in the directory your repository is stored at. The git remote add command takes two arguments: A unique remote name, for example, “my_awesome_new_remote_repo” A remote URL, which you can find on the Source sub-tab of your Git repo.


2 Answers

simply add


    [branch "master"]
        remote = origin
        merge = refs/heads/master

into .git/config to pull from origin/master into master

like image 70
CBke Avatar answered Sep 30 '22 12:09

CBke


You can do this in the "Git Repositories" tab.

Window > Show view > Other... > Git > Git Repositories

Expend your project's repository > Right click on "Remotes" > Create Remote...

like image 38
Lionel Gaillard Avatar answered Sep 30 '22 10:09

Lionel Gaillard