Hirse / vscode-ungit

Extension to show ungit in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=Hirse.vscode-ungit
MIT License
28 stars 15 forks source link

credentials-helper is not executable on Linux #55

Open gigi206 opened 6 years ago

gigi206 commented 6 years ago

Hello,

On Linux credentials-helper is not executable and and that cause some problems :

-rw-r--r--. 1 gigix gigix 1,1K  1 juil. 20:39 VSCode/extensions/hirse.vscode-ungit-1.5.0/node_modules/ungit/bin/credentials-helper

Is it possible to set execution on this binary ? on official ungit github repository there is the executable set.

Hirse commented 6 years ago

ungit is installed as npm dependency. I don't think I can make changes to any files.

Do you have the same problems when you install ungit with npm manually?

gigi206 commented 6 years ago

Yes files have 755 rights :

$ mkdir nodejs      
$ cd nodejs                   
$ wget https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-x64.tar.xz                                                         
--2018-07-02 20:40:56--  https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-x64.tar.xz
Résolution de nodejs.org (nodejs.org)… 104.20.23.46, 104.20.22.46, 2400:cb00:2048:1::6814:172e, ...
Connexion à nodejs.org (nodejs.org)|104.20.23.46|:443… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : 11351132 (11M) [application/x-xz]
Sauvegarde en : « node-v8.11.3-linux-x64.tar.xz »

node-v8.11.3-linux-x64.tar.xz              100%[========================================================================================>]  10,83M   813KB/s    ds 14s     

2018-07-02 20:41:10 (813 KB/s) — « node-v8.11.3-linux-x64.tar.xz » sauvegardé [11351132/11351132]

$ unxz node-v8.11.3-linux-x64.tar.xz       
$ tar xf node-v8.11.3-linux-x64.tar                                                           
$ cd node-v8.11.3-linux-x64/bin 
$ ./node npm install -g ungit
npm WARN deprecated keen.io@0.1.5: Please use keen-js package instead
npm WARN notice [SECURITY] superagent has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=superagent&version=0.21.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] mime has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=mime&version=1.2.11 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] mime has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=mime&version=1.2.11 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
/home/gigix/nodejs/node-v8.11.3-linux-x64/bin/ungit -> /home/gigix/nodejs/node-v8.11.3-linux-x64/lib/node_modules/ungit/bin/ungit
/home/gigix/nodejs/node-v8.11.3-linux-x64/bin/0ungit-credentials-helper -> /home/gigix/nodejs/node-v8.11.3-linux-x64/lib/node_modules/ungit/bin/credentials-helper
+ ungit@1.4.28
added 1026 packages in 25.076s

   ╭─────────────────────────────────────╮
   │                                     │
   │   Update available 5.6.0 → 6.1.0    │
   │     Run npm i -g npm to update      │
   │                                     │
   ╰─────────────────────────────────────╯

$ ll /home/gigix/nodejs/node-v8.11.3-linux-x64/lib/node_modules/ungit/bin/    
total 8,0K
-rwxr-xr-x. 1 gigix gigix 1,1K  2 juil. 20:42 credentials-helper
-rwxr-xr-x. 1 gigix gigix 3,1K  2 juil. 20:42 ungit

This result with the following issue because I haven't gnome-ssh-askpass installed. If I chmod +x, there is no poblem : issue

SRugina commented 4 years ago

+1 I just ran into this issue too, and fixed it by running chmod +x on the file

Hirse commented 4 years ago

@campersau, @jung-kim is this something you can help with?

campersau commented 4 years ago

I have tested it a little bit and yes the executable flag is missing when installed on linux via vscode. The problem is that the vsix is missing the executable flag for that file. Building the vsix on linux will keep the executable flag but not on windows. Where do you build the releases?

Hirse commented 4 years ago

Thanks, @campersau. I currently build them locally on Windows. I can try to build it on WSL and see if that makes a difference.

Hirse commented 4 years ago

@gigi206 @SRugina Could you try the latest version please? https://github.com/Hirse/vscode-ungit/releases/tag/v2.2.1 It's built/packaged on WSL so it should hopefully have the right permissions.

campersau commented 4 years ago

It looks like the vsix is corrupt. I get the following error in vscode on windows and linux: image

Renaming the vsix to .zip and tying to open it results in an error (normally you can do that): image

Hirse commented 4 years ago

Yeah, I forgot a git pull in my linux environment. -.- Fixed now. You can try to update using VSCode or download from the link above.

campersau commented 4 years ago

Looks good now: image I also successfully authenticated through it 👍 .

gigi206 commented 4 years ago

Seems good only if we have nodejs installed. nodejs has become a requirement?