I am using Codenvy for my rails app. When I run git push -u origin --all
with my rails application i get a blank terminal. When I push using the Git > Remotes > Push menu
, I get the error "Can't store ssh key. Unable get private ssh key."
Is this a problem with OAuth, because I have not set that up yet. I tried following the Codenvy git documentation, but they provided no info on what to fill into the <HOST_IP>
, <SERVER_PORT>
, <CHE_HOST_IP>
, yourClientSecret
, and yourClientID
parameters. I have followed many online tutorials trying to connect my Codenvy App to GitHub, and none of them have been successful. I cannot seem to find one definitive way to do this. I am new to Codenvy, so could you please explain this to me?
Reproduction Steps: I have already:
- Added my Git user info to my preferences
- Added my GitHub info using
git config --global user.name/email "name/email"
- Added my remote origin with my repository name using
git remote add origin git@bitbucket.org:/
- Generated an SSH key using VCS under the host name "github.com" and added the public ssh to my GitHub account
UPDATE: I have fixed by git origin and now when I run git push -u origin -all
, I get the following error:
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/Git-Ibraheem/toy_app.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
When using the Codenvy Git menu, I get the same error:
failed to push 'master -> master' to 'https://github.com/Git-Ibraheem/toy_app.git'. Try to merge remote changes using pull, and then push again.
When I run git pull origin master
I get the following:
error: Pulling is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.`
Fix:
I ran the command git reset --hard HEAD
and then git push -u origin --all
. This was succesful!