Git Push does not work #224

Open
bnb opened this Issue Jul 1, 2015 · 42 comments

Comments

Projects
None yet
@bnb

bnb commented Jul 1, 2015

I'm on Windows 10 running Atom Latest. The Push command does not work - I have to manually open the command line and run git push in the correct folder to have it run properly. There's also another git-based Atom plugin that's having the same issue of not being able to push on Windows, because of shelljs (jacogr/atom-git-control#61). Is there a way to fix this?

@GaetanBt

This comment has been minimized.

Show comment
Hide comment
@GaetanBt

GaetanBt Jul 3, 2015

Same problem here with windows 7 and latest Atom version

GaetanBt commented Jul 3, 2015

Same problem here with windows 7 and latest Atom version

@Japskua

This comment has been minimized.

Show comment
Hide comment
@Japskua

Japskua Jul 10, 2015

Agreed, same thing.

Japskua commented Jul 10, 2015

Agreed, same thing.

@rwestonbutler

This comment has been minimized.

Show comment
Hide comment
@rwestonbutler

rwestonbutler Jul 12, 2015

Same issue here with windows 7, atom 1.0.2. Looks like it tries to open some window at the bottom of the editor, but it is blank:

image

Same issue here with windows 7, atom 1.0.2. Looks like it tries to open some window at the bottom of the editor, but it is blank:

image

@Chet77

This comment has been minimized.

Show comment
Hide comment
@Chet77

Chet77 Jul 13, 2015

Same problem Win 7 Atom - Latest Version 1.0.2

Chet77 commented Jul 13, 2015

Same problem Win 7 Atom - Latest Version 1.0.2

@GaetanBt

This comment has been minimized.

Show comment
Hide comment
@GaetanBt

GaetanBt Jul 16, 2015

Just tried with my Mac on Yosemite (Osx 10.10.2) and Atom 1.0.2 and it works perfectly

Just tried with my Mac on Yosemite (Osx 10.10.2) and Atom 1.0.2 and it works perfectly

@Japskua

This comment has been minimized.

Show comment
Hide comment
@Japskua

Japskua Jul 16, 2015

The problem is on Windows, not Mac...

Japskua commented Jul 16, 2015

The problem is on Windows, not Mac...

@fprieur

This comment has been minimized.

Show comment
Hide comment
@fprieur

fprieur Aug 6, 2015

Same here on win7 64

fprieur commented Aug 6, 2015

Same here on win7 64

@akonwi

This comment has been minimized.

Show comment
Hide comment
@akonwi

akonwi Aug 7, 2015

Owner

Previous users have had this issue. I'm not familiar with windows but for them it was resolved after cleaning up environment variables and ssh keys.

See #74 #85 #103 #99 #82

Owner

akonwi commented Aug 7, 2015

Previous users have had this issue. I'm not familiar with windows but for them it was resolved after cleaning up environment variables and ssh keys.

See #74 #85 #103 #99 #82

@joncombe

This comment has been minimized.

Show comment
Hide comment
@joncombe

joncombe Aug 17, 2015

Maybe this will help others with the same issue on Windows authenticating using an SSH key.

On Windows I've always used Pagent (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) to handle my SSH Keys. For some reason (I don't know why), these keys appear to be ignored when using git on Windows, hence the push fails.

To get round this, generate a new SSH key in using OpenSSH (these instructions look good: http://guides.beanstalkapp.com/version-control/git-on-windows.html#installing-ssh-keys) and copy the public key to GitHub in the usual way.

Finally, test "git clone" / "git push" works using the command line (as you'll see descriptive errors if there is a problem) and if that works, then try using git-plus in Atom. Worked for me.

Maybe this will help others with the same issue on Windows authenticating using an SSH key.

On Windows I've always used Pagent (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) to handle my SSH Keys. For some reason (I don't know why), these keys appear to be ignored when using git on Windows, hence the push fails.

To get round this, generate a new SSH key in using OpenSSH (these instructions look good: http://guides.beanstalkapp.com/version-control/git-on-windows.html#installing-ssh-keys) and copy the public key to GitHub in the usual way.

Finally, test "git clone" / "git push" works using the command line (as you'll see descriptive errors if there is a problem) and if that works, then try using git-plus in Atom. Worked for me.

@filipesilva

This comment has been minimized.

Show comment
Hide comment
@filipesilva

filipesilva Aug 20, 2015

My experience is that this is related to ssh keys, yes.

My experience is that this is related to ssh keys, yes.

@Oliver84

This comment has been minimized.

Show comment
Hide comment
@Oliver84

Oliver84 Sep 4, 2015

I'm having the same issue on Ubuntu. Git push works fine in the terminal, but not on Atom.

Oliver84 commented Sep 4, 2015

I'm having the same issue on Ubuntu. Git push works fine in the terminal, but not on Atom.

@Oliver84

This comment has been minimized.

Show comment
Hide comment
@Oliver84

Oliver84 Sep 5, 2015

I'm not sure if my issue is related to everyone else's here but mine was giving me an error regarding askpass. I installed it with the command below and it's now working.

sudo apt-get install ssh-askpass

Oliver84 commented Sep 5, 2015

I'm not sure if my issue is related to everyone else's here but mine was giving me an error regarding askpass. I installed it with the command below and it's now working.

sudo apt-get install ssh-askpass

@phphoenix

This comment has been minimized.

Show comment
Hide comment
@phphoenix

phphoenix Sep 12, 2015

Here has been my workaround for this issue, i could get git plus to find the right path the ssh keys were in but started getting, other error messages, I decided to try joncombe's approach and use pagent. Here's a very verbose how-to following each step I did to get atom to push and pull with git plus. These steps will convert your existing keys to a .ppk key without needing to change your keys on github or bitbucket.
You're going to need multiple putty programs so just get the .zip that has all the binaries.

  1. open puttygen.exe
  2. Under conversions select import key
  3. find and open your id_rsa key you've been using
  4. Put in your passphrase if you use one,
  5. to verify you can match keys on GitHub/Bitbucket comparing to the "Public Key for pasting into OpenSSH authorized_keys file:" section.
  6. Click "Save Private Key", it should be .ppk
  7. Open Pageant.exe, it opens as system tray icon
  8. Right click and select Add Key.
  9. Add your private key that was saved earlier in step 6.
  10. Set the environment variable for GIT_SSH to plink.exe
    GIT_SSH
    C:\path\to\plink.exe
  11. Input passphrase if needed.
  12. Right click pageant in your system tray, and select new session, this opens putty
  13. In the host name type git@github.com or git@bitbucket.com, connection type: SSH , port: 22 and open
  14. Accept the notice about the unknown host key blah blah.

the last step needed because plink is just a backend to putty's functions so connecting without doing this step doesn't accept the key and add to known hosts

Doing all this allowed me to push/pull with atom on windows.

sorry if i was too wordy.

Here has been my workaround for this issue, i could get git plus to find the right path the ssh keys were in but started getting, other error messages, I decided to try joncombe's approach and use pagent. Here's a very verbose how-to following each step I did to get atom to push and pull with git plus. These steps will convert your existing keys to a .ppk key without needing to change your keys on github or bitbucket.
You're going to need multiple putty programs so just get the .zip that has all the binaries.

  1. open puttygen.exe
  2. Under conversions select import key
  3. find and open your id_rsa key you've been using
  4. Put in your passphrase if you use one,
  5. to verify you can match keys on GitHub/Bitbucket comparing to the "Public Key for pasting into OpenSSH authorized_keys file:" section.
  6. Click "Save Private Key", it should be .ppk
  7. Open Pageant.exe, it opens as system tray icon
  8. Right click and select Add Key.
  9. Add your private key that was saved earlier in step 6.
  10. Set the environment variable for GIT_SSH to plink.exe
    GIT_SSH
    C:\path\to\plink.exe
  11. Input passphrase if needed.
  12. Right click pageant in your system tray, and select new session, this opens putty
  13. In the host name type git@github.com or git@bitbucket.com, connection type: SSH , port: 22 and open
  14. Accept the notice about the unknown host key blah blah.

the last step needed because plink is just a backend to putty's functions so connecting without doing this step doesn't accept the key and add to known hosts

Doing all this allowed me to push/pull with atom on windows.

sorry if i was too wordy.

@ehasanbegovic

This comment has been minimized.

Show comment
Hide comment
@ehasanbegovic

ehasanbegovic Nov 15, 2015

I had the same issue on Windows 8.1 - everything worked except push. For me the issue was related to credentials (I had to insert the credentials from the cmd for each push), might help someone else too:

  1. First - the obvious, you must have git in your environment variables:

http://stackoverflow.com/questions/4492979/git-is-not-recognized-as-an-internal-or-external-command

  1. Install the Microsoft credential manager

https://github.com/Microsoft/Git-Credential-Manager-for-Windows

  1. Make one push from git bash to enter your credentials and restart atom and command prompt. It should remember your credentials and the push from Atom git plus should work.

I had the same issue on Windows 8.1 - everything worked except push. For me the issue was related to credentials (I had to insert the credentials from the cmd for each push), might help someone else too:

  1. First - the obvious, you must have git in your environment variables:

http://stackoverflow.com/questions/4492979/git-is-not-recognized-as-an-internal-or-external-command

  1. Install the Microsoft credential manager

https://github.com/Microsoft/Git-Credential-Manager-for-Windows

  1. Make one push from git bash to enter your credentials and restart atom and command prompt. It should remember your credentials and the push from Atom git plus should work.
@orlade

This comment has been minimized.

Show comment
Hide comment
@orlade

orlade Nov 16, 2015

I had the same problem, fixed environment variables, using Pageant and GIT_SSH for plink, but still didn't work, then eventually it did. I think if you can manage to push from the regular cmd command line, Atom should be able to push too.

After you make any environmental changes, use Task Manager to ensure all instances of the application under test (cmd, Atom, etc.) are killed and restarted. If in doubt, restart your computer (the Windows solution).

orlade commented Nov 16, 2015

I had the same problem, fixed environment variables, using Pageant and GIT_SSH for plink, but still didn't work, then eventually it did. I think if you can manage to push from the regular cmd command line, Atom should be able to push too.

After you make any environmental changes, use Task Manager to ensure all instances of the application under test (cmd, Atom, etc.) are killed and restarted. If in doubt, restart your computer (the Windows solution).

@DollarAkshay

This comment has been minimized.

Show comment
Hide comment
@DollarAkshay

DollarAkshay Dec 24, 2015

@ehasanbegovic Thank you Sir. Your comment helped me. Its working now. Just had to add the path variable

@ehasanbegovic Thank you Sir. Your comment helped me. Its working now. Just had to add the path variable

@blooski

This comment has been minimized.

Show comment
Hide comment
@blooski

blooski Apr 27, 2016

Adding the Credential Manager did the trick. Thanks. (Atom on Win7 64)

blooski commented Apr 27, 2016

Adding the Credential Manager did the trick. Thanks. (Atom on Win7 64)

@kishorramanan

This comment has been minimized.

Show comment
Hide comment
@kishorramanan

kishorramanan Nov 2, 2016

Had to do all things combined
Check Git path or set to default if you are able to access in cmd
Install Git Wincred [https://github.com/Microsoft/Git-Credential-Manager-for-Windows]
Do a manual push from windows cmd not Git bash
Add wincred to git credential [https://help.github.com/articles/caching-your-github-password-in-git/]

Had to do all things combined
Check Git path or set to default if you are able to access in cmd
Install Git Wincred [https://github.com/Microsoft/Git-Credential-Manager-for-Windows]
Do a manual push from windows cmd not Git bash
Add wincred to git credential [https://help.github.com/articles/caching-your-github-password-in-git/]

@akonwi

This comment has been minimized.

Show comment
Hide comment
@akonwi

akonwi Nov 4, 2016

Owner

There is another issue related to pushing on windows machines at #413.

The solution posted there is:

In order to have the PUSH working, you need to add the GitHub.exe (not git.exe) path to Environment Variable PATH and restart Atom.

This is how I found GitHub.exe path (in Windows)

  1. Run GitHub desktop
  2. Open the Task Manager, right click on GitHub (32 bit) process and select Open File Location

In my case GitHub.exe was in the folder C:\Users\cassani\AppData\Local\Apps\2.0\H35QN991.JQW\RZJQ033T.E6B\gith..tion_317444273a93ac29_0003.0000_eb093b9833279bd4\

Owner

akonwi commented Nov 4, 2016

There is another issue related to pushing on windows machines at #413.

The solution posted there is:

In order to have the PUSH working, you need to add the GitHub.exe (not git.exe) path to Environment Variable PATH and restart Atom.

This is how I found GitHub.exe path (in Windows)

  1. Run GitHub desktop
  2. Open the Task Manager, right click on GitHub (32 bit) process and select Open File Location

In my case GitHub.exe was in the folder C:\Users\cassani\AppData\Local\Apps\2.0\H35QN991.JQW\RZJQ033T.E6B\gith..tion_317444273a93ac29_0003.0000_eb093b9833279bd4\

@lleiou

This comment has been minimized.

Show comment
Hide comment
@lleiou

lleiou Jan 25, 2017

But I have the same problem on Mac, is there any related solutions? Thanks a lot.

lleiou commented Jan 25, 2017

But I have the same problem on Mac, is there any related solutions? Thanks a lot.

@akonwi

This comment has been minimized.

Show comment
Hide comment
@akonwi

akonwi Jan 26, 2017

Owner

@lleiou Do you have git configured to push using ssh without credentials?

Owner

akonwi commented Jan 26, 2017

@lleiou Do you have git configured to push using ssh without credentials?

@navanjr

This comment has been minimized.

Show comment
Hide comment
@navanjr

navanjr Jan 26, 2017

FWIW, I had the same issue, until I realized I was running an older version of Atom.
Updated to 1.13.1 and it works now.

navanjr commented Jan 26, 2017

FWIW, I had the same issue, until I realized I was running an older version of Atom.
Updated to 1.13.1 and it works now.

@lleiou

This comment has been minimized.

Show comment
Hide comment
@lleiou

lleiou Feb 1, 2017

@akonwi Yes I think I used SSH to push, do I need to extra step to set up the credentials???

lleiou commented Feb 1, 2017

@akonwi Yes I think I used SSH to push, do I need to extra step to set up the credentials???

@lleiou

This comment has been minimized.

Show comment
Hide comment
@lleiou

lleiou Feb 1, 2017

@akonwi Thank you for your words, I finally made it!
I will write down my solution here tomorrow!

lleiou commented Feb 1, 2017

@akonwi Thank you for your words, I finally made it!
I will write down my solution here tomorrow!

@lleiou

This comment has been minimized.

Show comment
Hide comment
@lleiou

lleiou Feb 1, 2017

@akonwi I find that although I have added the key to the ssh-agent within the terminal, I have to add it again under Atom...That's how I fixed my strange problem......

lleiou commented Feb 1, 2017

@akonwi I find that although I have added the key to the ssh-agent within the terminal, I have to add it again under Atom...That's how I fixed my strange problem......

@ror6ax

This comment has been minimized.

Show comment
Hide comment
@ror6ax

ror6ax Feb 14, 2017

Just chiming in that Credential Manager solves the issue. 👍

ror6ax commented Feb 14, 2017

Just chiming in that Credential Manager solves the issue. 👍

@genghisun

This comment has been minimized.

Show comment
Hide comment
@genghisun

genghisun Apr 26, 2017

@lleiou seems like you have fixed that problem, could you tell me how to "add it again under Atom"?

@lleiou seems like you have fixed that problem, could you tell me how to "add it again under Atom"?

@lleiou

This comment has been minimized.

Show comment
Hide comment
@lleiou

lleiou Apr 26, 2017

@genghisun Well this doesn't seem a perfect solution, but you can give it a try:

Assume you have "Open-terminal-here" package installed, open the terminal under one of your project, and type ssh-add ~/.ssh/id_rsa, then you will be prompted to input password, and git plus will work again...

screen shot 2017-04-26 at 1 02 27 pm

So every time git plus doesn't work, repeat the procedure above and it will be back to normal....👀 (at least on my Mac)

lleiou commented Apr 26, 2017

@genghisun Well this doesn't seem a perfect solution, but you can give it a try:

Assume you have "Open-terminal-here" package installed, open the terminal under one of your project, and type ssh-add ~/.ssh/id_rsa, then you will be prompted to input password, and git plus will work again...

screen shot 2017-04-26 at 1 02 27 pm

So every time git plus doesn't work, repeat the procedure above and it will be back to normal....👀 (at least on my Mac)

@genghisun

This comment has been minimized.

Show comment
Hide comment
@genghisun

genghisun Apr 27, 2017

@lleiou THANKS for your answering, ❤️

@lleiou THANKS for your answering, ❤️

@sum01

This comment has been minimized.

Show comment
Hide comment
@sum01

sum01 May 4, 2017

Having the same problem. Confirmed that I can push via SSH with the terminal, but not while in Atom with git-plus.

git-plus_error

sum01 commented May 4, 2017

Having the same problem. Confirmed that I can push via SSH with the terminal, but not while in Atom with git-plus.

git-plus_error

@kishorramanan

This comment has been minimized.

Show comment
Hide comment
@kishorramanan

kishorramanan May 4, 2017

@sum01 Have you created a SSH config file?

@sum01 Have you created a SSH config file?

@ror6ax

This comment has been minimized.

Show comment
Hide comment
@ror6ax

ror6ax May 4, 2017

A bigger problem here, as far as I am concerned, is silent failure. If you push, plugin works as if it actually happens for me, But it does not happen. :(

ror6ax commented May 4, 2017

A bigger problem here, as far as I am concerned, is silent failure. If you push, plugin works as if it actually happens for me, But it does not happen. :(

@sum01

This comment has been minimized.

Show comment
Hide comment
@sum01

sum01 May 4, 2017

@kishorramanan Yes, although I'm honestly not sure if it's correct.

Host github.com
    HostName github.com
    User sum01
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/id_rsa.pub

at the file path ~/.ssh/ssh_config

sum01 commented May 4, 2017

@kishorramanan Yes, although I'm honestly not sure if it's correct.

Host github.com
    HostName github.com
    User sum01
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/id_rsa.pub

at the file path ~/.ssh/ssh_config

@kishorramanan

This comment has been minimized.

Show comment
Hide comment
@kishorramanan

kishorramanan May 4, 2017

@sum01
if you are the single user you need not specify user and PreferredAuthentications
below is my config file for windows 10

Host stash.company.com
 IdentityFile C:\Users\mysusername\.ssh\id_rsa
Host github.com
 IdentityFile C:\Users\mysusername\.ssh\git_hub

make a git pull/push from bash once before you try it in atom

@ror6ax I had the similar problem, git credential manger also didn't help.
SSH and the above config solved the issue.

kishorramanan commented May 4, 2017

@sum01
if you are the single user you need not specify user and PreferredAuthentications
below is my config file for windows 10

Host stash.company.com
 IdentityFile C:\Users\mysusername\.ssh\id_rsa
Host github.com
 IdentityFile C:\Users\mysusername\.ssh\git_hub

make a git pull/push from bash once before you try it in atom

@ror6ax I had the similar problem, git credential manger also didn't help.
SSH and the above config solved the issue.

@sum01

This comment has been minimized.

Show comment
Hide comment
@sum01

sum01 May 4, 2017

@kishorramanan Didn't fix it. I got the little green popup on Atom showing it pushed, but opening the error bin thing (clicking git+ in the bottom-right) shows the same error as before. I still have bash open from doing a pull on the repo, which worked fine (verified by browsing around in the files that got pulled).

Side-note: Only the master branch is being detected in Atom. In reality, I have 3 branches, but the other 2 don't show up at all. This seems to be related to a different issue though.

sum01 commented May 4, 2017

@kishorramanan Didn't fix it. I got the little green popup on Atom showing it pushed, but opening the error bin thing (clicking git+ in the bottom-right) shows the same error as before. I still have bash open from doing a pull on the repo, which worked fine (verified by browsing around in the files that got pulled).

Side-note: Only the master branch is being detected in Atom. In reality, I have 3 branches, but the other 2 don't show up at all. This seems to be related to a different issue though.

@kishorramanan

This comment has been minimized.

Show comment
Hide comment
@kishorramanan

kishorramanan May 5, 2017

@sum01 try updating GIT for the PUSH issue. as for branch, you can checkout each branch separately either in atom or in git bash, then try it from atom icon.

@sum01 try updating GIT for the PUSH issue. as for branch, you can checkout each branch separately either in atom or in git bash, then try it from atom icon.

@sum01

This comment has been minimized.

Show comment
Hide comment
@sum01

sum01 May 5, 2017

@kishorramanan I'm already running Git 2.12.2-4, Atom 1.16.0-1, and git-plus 7.8.0 on Linux 4.10.13-1-ARCH. There's nothing to update to, barring dev repo's.

But anyways, I'm still not really sure what else I can do to get git-plus to be able to push. When that green box comes up saying "push successful" or whatever it says, git-plus seems to think it actually pushed files, as the once-orange (aka files with diff's) files get their colors changed back to normal. But then I open the git+ log and it shows the same ssh_askpass error in the image I posted before.

sum01 commented May 5, 2017

@kishorramanan I'm already running Git 2.12.2-4, Atom 1.16.0-1, and git-plus 7.8.0 on Linux 4.10.13-1-ARCH. There's nothing to update to, barring dev repo's.

But anyways, I'm still not really sure what else I can do to get git-plus to be able to push. When that green box comes up saying "push successful" or whatever it says, git-plus seems to think it actually pushed files, as the once-orange (aka files with diff's) files get their colors changed back to normal. But then I open the git+ log and it shows the same ssh_askpass error in the image I posted before.

@ahmedtabrez

This comment has been minimized.

Show comment
Hide comment
@ahmedtabrez

ahmedtabrez Jul 18, 2017

👍
Same proble here on Ubuntu 16.04

ahmedtabrez commented Jul 18, 2017

👍
Same proble here on Ubuntu 16.04

@ZFYL

This comment has been minimized.

Show comment
Hide comment
@ZFYL

ZFYL Aug 15, 2017

Atom latest version, same here

ZFYL commented Aug 15, 2017

Atom latest version, same here

@AlecBenzer

This comment has been minimized.

Show comment
Hide comment
@AlecBenzer

AlecBenzer Sep 13, 2017

@ror6ax Yeah +100. If this failed loudly it would be much easier to figure out a fix. Primary issue here is definitely the silent failure.

@ror6ax Yeah +100. If this failed loudly it would be much easier to figure out a fix. Primary issue here is definitely the silent failure.

@hammer-wang

This comment has been minimized.

Show comment
Hide comment
@hammer-wang

hammer-wang Sep 23, 2017

Same here with Windows 10

Same here with Windows 10

@kadomcevi

This comment has been minimized.

Show comment
Hide comment
@kadomcevi

kadomcevi Sep 28, 2017

"ssh_askpass" issue under Linux related to package ssh_askpass which should be installed, because git-plus ask password using this command.
For Gentoo linux exist at least 3 working packages:

lxqt-base/lxqt-openssh-askpass
net-misc/ssh-askpass-fullscreen
net-misc/x11-ssh-askpass

"ssh_askpass" issue under Linux related to package ssh_askpass which should be installed, because git-plus ask password using this command.
For Gentoo linux exist at least 3 working packages:

lxqt-base/lxqt-openssh-askpass
net-misc/ssh-askpass-fullscreen
net-misc/x11-ssh-askpass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment