eGit- rejected

Discussion in 'Plugin Development' started by matejdro, Apr 12, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    matejdro

    What could be wrong? I cannot push any changes to github.

    12-4-2012 18-22-57.jpg
     
  2. Offline

    Giant

    Can be multiple things. Try a push from the console/terminal itself, as that generally turns back a "little" bit more info! :)
     
  3. Offline

    matejdro

    Um, I don't use terminal or ssh, but https links with username and passwords.

    It worked before, but after fiddling a bit with branches and merging, my whole eclipse got messed up, so I created new workspace. But now it will not commit stuff. I'm pretty sure I have entered correct password.
     
  4. Offline

    Giant

    Even if you normally don't use the terminal, you can still use it now. If you need assistance on how to, feel free to ask!
    Because the thing is, it can be multiple things that cause it. It can be your users SSH key being denied but github, it can be your project ran out of sync. And more stuff like that.
     
  5. Offline

    matejdro

    Um, as I said I don't use SSH key.

    But anway, how can I check this via terminal? I never used that before :(
     
  6. Offline

    Giant

    ok it's not that hard actually! :
    - Start of by opening the terminal.
    - cd /path/to/your/project
    - git push
     
  7. Offline

    matejdro

    Code:
    To https://[email protected]/matejdro/Jail.git
     ! [rejected]        master -> master (non-fast-forward)
    error: failed to push some refs to 'https://[email protected]/matejdro/Jail.git'
    To prevent you from losing history, non-fast-forward updates were rejected
    Merge the remote changes (e.g. 'git pull') before pushing again.  See the
    'Note about fast-forwards' section of 'git push --help' for details.
    Any ideas?
     
  8. Offline

    Sorroko

    Whats happened (as far as i can tell, im not an expert) is youve changed your git or merged someones pull request and then you havent updated your local copy of the files, you have then modified them and now git is freaking out over wether to keep the file on github or use your local file. So delete your local file (make a backup) then pull form github to get gits copy, then replace with your backup and commit.
    Also im pretty sure you need to use an ssh key to access git, http/s is read only, to be able to write you need to have permission and an ssh key
     
  9. Offline

    Giant

    Your local repository is behind on the one @ github. I guess you did the branch fun @ github? Did you pull after doing that? If not then there's the reason. You can try a git pull now aswell. If you didn't change the files that you changed online it should generally work just fine.
     
  10. Offline

    matejdro

    Yeah, pull saved it, thanks! I wonder why is so hard to write something like "your local copy is out of sync with remote" instead of just "rejected"?

    https is not read only, you log in with your github username and password.
     
  11. Offline

    Giant

    matejdro I'm not sure why the netbeans and eclipse git plugins don't throw the actual error... I know I find it lacking aswell, luckely I tend to use the console more for git though :D

    [edit]
    Jeesh, am suffering from typlexia badly :(
     
Thread Status:
Not open for further replies.

Share This Page