3

I followed the tutorial http://wiki.eclipse.org/EGit/User_Guide#GitHub_Tutorial to setup EGit with GitHub. When I want to pull I had the same problem described here: The current branch is not configured for pull No value for key branch.master.merge found in configuration

When I add the following to .git/config

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

I get another error:

The current branch is not configured for pull No value for key remote.origin.url found in configuration

How can I fix this?

apokryfos
  • 38,771
  • 9
  • 70
  • 114
hansi
  • 2,278
  • 6
  • 34
  • 42

2 Answers2

3

As mention in bug 352687, this is probably because the remote section of your git config file doesn't include an 'origin' remote.

See the "Adding a Remote Configuration " section of the Egit User Guide:
If you don't have a remote "origin", you can add one.

add remote

(this example defines a new remote "pushtofile", but, again, you can define one named "origin" if you didn't have one yet.)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • The screenshot is different from EGit in Kepler, where radio buttons instead of checkboxes are used. So only Push or Fetch configure at a time. – Paul Verest Aug 05 '13 at 12:14
2

Full .git/config file should be like:

[core]
    repositoryformatversion = 0
    filemode = false
    logallrefupdates = true
[remote "origin"]
    url = http://gitlab.funshion.com/gitlab/sandbox/try-conflict-resolution.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master
Paul Verest
  • 60,022
  • 51
  • 208
  • 332