vscode-ungit icon indicating copy to clipboard operation
vscode-ungit copied to clipboard

credentials-helper is not executable on Linux

Open gigi206 opened this issue 6 years ago • 11 comments

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.

gigi206 avatar Jul 01 '18 18:07 gigi206

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?

Hirse avatar Jul 01 '18 22:07 Hirse

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 [email protected]: 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
+ [email protected]
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

gigi206 avatar Jul 02 '18 18:07 gigi206

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

SRugina avatar Dec 13 '19 17:12 SRugina

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

Hirse avatar Feb 01 '20 03:02 Hirse

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?

campersau avatar Feb 01 '20 09:02 campersau

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 avatar Feb 03 '20 17:02 Hirse

@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.

Hirse avatar Feb 05 '20 05:02 Hirse

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

campersau avatar Feb 05 '20 05:02 campersau

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.

Hirse avatar Feb 05 '20 05:02 Hirse

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

campersau avatar Feb 05 '20 06:02 campersau

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

gigi206 avatar May 04 '20 19:05 gigi206