The new Git Integration in Atom does not work on my computer since the 1.18 version.
.git subdirectory can be seen in the seen in the Treeview - Project Tab/Pane. The files/folders have correct colors according to their git VCS state (black/green/dark-orange). The branch name is not displayed in the statusbar, as it used to be in the previous versions of Atom. However, the correct branch name can be seen in statusbar for the very short moment when starting Atom before the Atom's GUI gets fully initialized.Create repository button is present in the Git Tab/Pane. After clicking on that button the Error popup appears.Unable to initialize git repository in /home/SOME_PATH_HERE_EDITED/006_sandbox
/opt/atom/resources/app/node_modules/dugite/git/bin/git: 1:
/opt/atom/resources/app/node_modules/dugite/git/bin/git:
Syntax error: Unterminated quoted string
Git Tab/Pane is somewhat blank, see screenshot. There definitely are modified-unstaged files in the project folder, also the modified-staged files; these can be seen in system terminal via git status command. These files are not displayed in the Git Tab/Pane in the Atom editor. The Commit button is disabled.
Reproduces how often: Always. Tested with multiple directories/projects using Git VCS. When Atom is used for the project/directory that actually is not the git repository (git init never ran in the directory; .git subdirectory not present in the directory), the steps 3 and 4 can also be reproduced in Atom.
$ atom --version
Atom : 1.18.0
Electron: 1.3.15
Chrome : 52.0.2743.82
Node : 6.5.0
$ apm --version
apm 1.18.1
npm 3.10.10
node 6.9.5 ia32
python 2.7.12
git 2.7.4
Ubuntu 16.04 32-bit
Linux 4.4.0-81-generic i686 GNU/Linux
Because the issue has not yet been reported, I suspect the issue could be 32-bit related only or very specific.
I already reported the issue in the atom/atom repository, I have been asked to re-open here.
I am having a very similar issue - also running 32bit (Windows 7).
I have tried both the up-to-date stable and beta versions and I am having the same issues. I attempted to completely uninstall atom from my computer (which, by the way, is more difficult than it should be).
Here is what I'm getting from the console:
Uncaught (in promise) Error: spawn UNKNOWN
at exports._errnoException (util.js:1026:11)
at ChildProcess.spawn (internal/child_process.js:313:11)
at exports.spawn (child_process.js:392:9)
at Object.exports.execFile (child_process.js:155:15)
at Object.module.(anonymous function) [as execFile] (ELECTRON_ASAR.js:195:20)
at C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\dugite\build\lib\git-process.js:65:52
at Function.exec (C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\dugite\build\lib\git-process.js:48:16)
at Proxy.executeGitCommand (C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\git-shell-out-strategy.js:343:54)
at C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\git-shell-out-strategy.js:214:48
at next (<anonymous>)
at step (C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\git-shell-out-strategy.js:74:197)
at C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\git-shell-out-strategy.js:74:443
at C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\git-shell-out-strategy.js:74:105
at Promise (C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\git-shell-out-strategy.js:311:30)
at C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\git-shell-out-strategy.js:212:20
at next (<anonymous>)
at step (C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\git-shell-out-strategy.js:74:197)
at C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\git-shell-out-strategy.js:74:443
at C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\git-shell-out-strategy.js:74:105
at C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\async-queue.js:26:44
at next (<anonymous>)
at step (C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\async-queue.js:7:197)
at C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\async-queue.js:7:443
at C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\async-queue.js:7:105
at Task.execute (C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\async-queue.js:31:13)
at C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\async-queue.js:96:26
at next (<anonymous>)
at step (C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\async-queue.js:7:197)
at C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\async-queue.js:7:443
at C:\Users\conwelps\AppData\Local\atom\app-1.18.0\resources\app\node_modules\github\lib\async-queue.js:7:105
Just for clarity, I've been using git & github with my projects for a while and I've had zero issues using git through the CLI. Additionally, I did a fresh git clone in a new empty, fresh directory just to make sure, still getting the same issues.
Any update on the above issue. As I'm also facing the similar issue.
Confirmed on 14.04 with ppa:webupd8team/atom. Cant link my project to github.
Confirm this bug too. Win7 32-bit, Atom ver. 1.18.0, git ver. 2.9.2
Confirmed on 16.04.1-Ubuntu with ppa:webupd8team/atom
I had similar problem. The message was at least very similar or if not same than the one @pconwell had. I did some digging and found out that the git executable provided with dugite (inside github package) was 64bit even the machine I'm running Atom is 32bit and that's why it didn't work.
I also found here that I can specify LOCAL_GIT_DIRECTORY environment variable to use other git installation.
So, I removed git dir inside github Atom package and specified the environment variable and restarted Atom. The result: Github package now works.
Edit: it seems (at least on my Windows machine) it's not necessary to remove the git provided with dugite. It's enough to specify the environment variable.
Confirmed on Ubuntu 16.04 32-bit with ppa:webupd8team/atom. Can't link my project to GitHub.
@mkoske Could you give a detailed explanation on how to do that, please? Thanks.
@EXmaster9 To do what exactly? I updated my comment since at least on my machine it wasn't necessary to remove git provided with dugite / Atom's github package but just create environment variable.
You could try to google for how to make environment variables in Ubuntu. Then just create one environment variable called LOCAL_GIT_DIRECTORY and make it's value to be the directory where your git installation is, like /usr/bin.
If you don't have git installed, you could install it for example with apt-get.
Minor update to this issue. The last line of the error message has slightly changed in Atom 1.19.
Unable to initialize git repository in /home/SOME_PATH_HERE_EDITED/006_sandbox
/opt/atom/resources/app/node_modules/dugite/git/bin/git: 1:
/opt/atom/resources/app/node_modules/dugite/git/bin/git:
Syntax error: "(" unexpected
Please note the change from Syntax error: Unterminated quoted string (1.18) to Syntax error: "(" unexpected 1.19.
I obviously missed the #917 issue, which is the same as this one. My mistake, sorry ;-)
I use Linux Calculate(gentoo clone) and package app-editors/atom-bin-1.20.1
For me this issue occurred because file /usr/share/atom/resources/app/node_modules/dugite/git/bin/git has not Exec permission.
So I solve it this way:
chmod +x /usr/share/atom/resources/app/node_modules/dugite/git/bin/git
Confirmed on Win10 32-bit, Atom version 1.21.1 ia32, git version 2.14.1.1
Same in Atom 1.22.1 ia32
https://github.com/atom/github/issues/986#issuecomment-324464549 Confirmed
https://github.com/atom/github/issues/986#issuecomment-332935406 didn't solve the problem for me :(
@mkoske could you detail the workaround with LOCAL_GIT_DIRECTORY? Almost 1 year, Atom devs did not get the fix for this issue?
@shmshd12 Just install Git to your computer, make an environment variable in your operating system and point it to your Git installation directory.
I have installed Git to C:\Programs\Git on my Windows machine and so I have Windows environment variable LOCAL_GIT_DIRECTORY which points to that directory.
Then restart your editor and it should work.
@mkoske thanks for mentioning that. It worked out for me. I had spelled the environment variable name incorrectly
@mkoske thanks, my mistake was I was pointing to /bin instead of main /Git directory. All fine now.
same on Atom 1.28.1/Windows 7, setting LOCAL_GIT_DIRECTORY variable does not help.
Setting the LOCAL_GIT_DIRECTORY environment variable to C:\Program Files\Git (local git installation folder) does the trick on
Windows 10, 32 bit
I can't commit to master however I try. I just click the commit to master button and nothing happens. I'm using VS Code again. Can someone fix this integration bug???
@ryan-ccn elaborate your issue.
When I click the "Commit to Master" button, nothing happens.
I just installed it.
I haven't set any settings yet.
@shmshd
Still your issue is not clear. Open console (ctrl + shift + j) from Atom and try to commit again. Then copy and paste it here
I can't use ctrl + shift + j somehow on mac.
Link
Here's the link to a screen recording I made on Atom (recently downloaded)
@shmshd
It was solved in the new release :smiley:
Most helpful comment
@shmshd12 Just install Git to your computer, make an environment variable in your operating system and point it to your Git installation directory.
I have installed Git to
C:\Programs\Giton my Windows machine and so I have Windows environment variableLOCAL_GIT_DIRECTORYwhich points to that directory.Then restart your editor and it should work.