. VSCode Version: 1.14.2 (latest version). OS Version: Mac OS Sierra (latest version) Steps to Reproduce:. Open up VSCode on OS X (Mac.). Configure a remote with password authentication (via terminal, f.ex. Your own server with password ssh authentication). Click on 'synchronize' button in VSCode in the lower left corner.
You will get an error message saying 'Error: Git: sshaskpass: exec(/usr/X11R6/bin/ssh-askpass): No such file or directory'. There only exists a directory named X11, but not X11R6 on OS X Sierra, so you would have to change the path, unfortunately this is not possible within the settings. Nobody is able to upload files (push) to any password-protected server now (if he's using an OS X device) Updating brew, installing the ssh-akspass package and starting the service didn't help. The problem / bug seems to be only on OS X devices, haven't seen any reports about Windows so far.
Reproduces without extensions: Yes. Same issue here w/ High Sierra. Solution did not work in this case. Note that this is for a project with a new key added to gitlab. I've not logged this machine into gitlab before. Also, by default, macOS doesn't have ssh-askpass as part of its arsenal, so I'm guessing that this is 'left over' from some git/.nix logic in the vscode git packages?
Running SFTP using keys is not a problem in the server as long as the.ssh directory is 700 and the authorized_keys file is 600. I have a second server with similar requirements requiring 777 on the home directory. Hi Uva, There are some Google hits mentioning it to be a bug, anyways please check google for possible solution, and since this is Linux related question you will get more support on a Linux Forum.
Indeed, if I manually clone via terminal, photon:GitHub git clone [email protected]:sleepyhead/sleepyhead-code.git Cloning into 'sleepyhead-code'. The authenticity of host 'gitlab.com (52.167.219.168)' can't be established. ECDSA key fingerprint is SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw.
Are you sure you want to continue connecting (yes/no)? Yes Warning: Permanently added 'gitlab.com,52.167.219.168' (ECDSA) to the list of known hosts.
Now, everything works. So it seems that the authenticity check raises an exception to the git handler in VSCode and, in response, it tries to spawn an 'Is this OK?' Check that doesn't exist on macOS.
I want to gain access to two machines on the LAN by means of ssh. In order to use emacs as a file manager, I do # ssh -Y remotehost, and then start emacs on that host, and split its window. One buffer accesses files on the remote machine, and I want the other buffer to access the local machine in order to use emacs to transfer files between the hosts.
However, this does not work. For example, if I bring up a shell in emacs (C-!) and do! Ssh localhost, I get: Pseudo-terminal will not be allocated because stdin is not a terminal.
Sshaskpass: exec(/usr/bin/ssh-askpass): No such file or directory Permission denied, please try again. Sshaskpass: exec(/usr/bin/ssh-askpass): No such file or directory Permission denied, please try again. Sshaskpass: exec(/usr/bin/ssh-askpass): No such file or directory Permission denied (publickey,password).
Is the problem not having access to pseudo-terminal, or it that there is no /usr/bin/ssh-askpass file? How do I construct that file.
Why can't I just provide the password when prompted for it? Haines Brown. I do something similar (I think) with my web development, but I go about it differently. I am already in emacs on my local machine and use the `M-x shell` to then ssh into the remote machine. For file management, I Tramp set up to use SSH by default, and I've had success copying back and forth remote-to-local and vice versa that way. Using dired/tramp, I can just highlight a file and hit 'C' (copy) and enter the local location, or the other way around.
It works pretty well for me (I've replaced putty and Filezilla with emacs), and I was doing a split-screen local/remote just yesterday with it. Tory Haines Brown writes. I want to gain access to two machines on the LAN by means of ssh.
In order to use emacs as a file manager, I do # ssh -Y remotehost, and then start emacs on that host, and split its window. One buffer accesses files on the remote machine, and I want the other buffer to access the local machine in order to use emacs to transfer files between the hosts. However, this does not work.
For example, if I bring up a shell in emacs (C-!) and do! Ssh localhostI get: Pseudo-terminal will not be allocated because stdin is not a terminal. sshaskpass: exec(/usr/bin/ssh-askpass): No such file or directory Permission denied, please try again. sshaskpass: exec(/usr/bin/ssh-askpass): No such file or directory Permission denied, please try again.
sshaskpass: exec(/usr/bin/ssh-askpass): No such file or directory Permission denied (publickey,password). Is the problem not having access to pseudo-terminal, or it that there is no /usr/bin/ssh-askpass file?
How do I construct that file. Why can't I just provide the password when prompted for it? Haines Brown. I do something similar (I think) with my web development, but I go about it differently. I am already in emacs on my local machine and use the `M-x shell` to then ssh into the remote machine. For file management, I Tramp set up to use SSH by default, and I've had success copying back and forth remote-to-local and vice versa that way. Using dired/tramp, I can just highlight a file and hit 'C' (copy) and enter the local location, or the other way around.
It works pretty well for me (I've replaced putty and Filezilla with emacs), and I was doing a split-screen local/remote just yesterday with it. - Tory Thanks, Tory, that was a help.
I was trying to run ssh from command prompt rather than shell. Can I expand on my question with one that is a bit OT? I use /.netrc (despite the hazards) to automate log in to remote machines. However things seem to have changed over the years since I last used it. I have a stanza like this, where anon will be the name of remote machine on the LAN machine root@anon login root password When in Emacs I log into the remote machine with C-x C-f /root@anon:/home/user I am prompted for the password which is not automatically sent: Password for /scpc:root@anon This 'scpc' method is new to me.
I tried putting into.netrc the machine value scpc.root@anon and scpc:root@anon, but still am prompted for the password. The Tramp manual and man netrc no help. On Mon, Jan 12, 2015 at 02:42:23PM -0500, Tory S. Anderson wrote: I do something similar (I think) with my web development, but I go about it differently. I am already in emacs on my local machine and use the `M-x shell` to then ssh into the remote machine. For file management, I Tramp set up to use SSH by default, and I've had success copying back and forth remote-to-local and vice versa that way.
Using dired/tramp, I can just highlight a file and hit 'C' (copy) and enter the local location, or the other way around. It works pretty well for me (I've replaced putty and Filezilla with emacs), and I was doing a split-screen local/remote just yesterday with it. - Tory Thanks, Tory, that was a help.
I was trying to run ssh from command prompt rather than shell. Can I expand on my question with one that is a bit OT?
I use /.netrc (despite the hazards) to automate log in to remote machines. However things seem to have changed over the years since I last used it.
I have a stanza like this, where anon will be the name of remote machine on the LAN machine root@anon login root password When in Emacs I log into the remote machine with C-x C-f /root@anon:/home/user I am prompted for the password which is not automatically sent: Password for /scpc:root@anon This 'scpc' method is new to me. I tried putting into.netrc the machine value scpc.root@anon and scpc:root@anon, but still am prompted for the password. The Tramp manual and man netrc no help. Haines. Where has that been all my life? I think.authinfo.gpg is going to save me much time.
Nikolay Kudryavtsev writes: Tramp methods are defined in tramp. See C-h v tramp-methods. And did you mean scp? To save password in tramp you can put your login and password into a file called /.authinfo.gpg in this format: machine anon login root password my-password Authinfo is protected by gpg, so you gonna get asked for a password for it, but just once. Alternatively you can use authorization by key. Nikolay Kudryavtsev writes: Tramp methods are defined in tramp.
See C-h v tramp-methods. And did you mean scp? 'scpc' was a supported Tramp method up to Tramp 2.2.6. It has been removed then. To save password in tramp you can put your login and password into a file called /.authinfo.gpg in this format: machine anon login root password my-password Authinfo is protected by gpg, so you gonna get asked for a password for it, but just once. Alternatively you can use authorization by key.
It might also be helpful to read the Tramp manual for this topic: (info '(tramp)Password handling') Best regards, Michael. On Mon, Jan 12, 2015 at 02:42:23PM -0500, Tory S. Anderson wrote: I do something similar (I think) with my web development, but I go about it differently. I am already in emacs on my local machine and use the `M-x shell` to then ssh into the remote machine. For file management, I Tramp set up to use SSH by default, and I've had success copying back and forth remote-to-local and vice versa that way. Using dired/tramp, I can just highlight a file and hit 'C' (copy) and enter the local location, or the other way around. It works pretty well for me (I've replaced putty and Filezilla with emacs), and I was doing a split-screen local/remote just yesterday with it.
- Tory Thanks, Tory, that was a help. I was trying to run ssh from command prompt rather than shell. Can I expand on my question with one that is a bit OT?
I use /.netrc (despite the hazards) to automate log in to remote machines. However things seem to have changed over the years since I last used it. I have a stanza like this, where anon will be the name of remote machine on the LAN machine root@anon login root password When in Emacs I log into the remote machine with C-x C-f /root@anon:/home/user I am prompted for the password which is not automatically sent: Password for /scpc:root@anon This 'scpc' method is new to me. I tried putting into.netrc the machine value scpc.root@anon and scpc:root@anon, but still am prompted for the password.
The Tramp manual and man netrc no help. Haines. On Tue, Jan 13, 2015 at 09:29:59AM -0500, Tory S. Anderson wrote: I forgot to mention, I also found this handy (although I might be able to forego it with the authinfo trick): ;Cache passwords for one hour (setq password-cache-expiry 3600) I've made some progress, but still can't access the password in the /.netrc file. More specifically, in emacs I do C-x C-f /user@anon: and get: Password for /ssh:user@anon: even though in /.netrc I have the stanza: machine user@anon login user password It seems the.netrc file not being read. On Tue, Jan 13, 2015 at 09:29:59AM -0500, Tory S.
Anderson wrote: I forgot to mention, I also found this handy (although I might be able to forego it with the authinfo trick): ;Cache passwords for one hour (setq password-cache-expiry 3600) I've made some progress, but still can't access the password in the /.netrc file. More specifically, in emacs I do C-x C-f /user@anon: and get: Password for /ssh:user@anon: even though in /.netrc I have the stanza: machine user@anon login user password It seems the.netrc file not being read. On Tue, Jan 13, 2015 at 09:29:59AM -0500, Tory S. Anderson wrote: I forgot to mention, I also found this handy (although I might be able to forego it with the authinfo trick): ;Cache passwords for one hour (setq password-cache-expiry 3600) I've made some progress, but still can't access the password in the /.netrc file. More specifically, in emacs I do C-x C-f /user@anon: and get: Password for /ssh:user@anon: even though in /.netrc I have the stanza: machine user@anon machine anon - Dan Espen. On Tue, Jan 13, 2015 at 10:23:14AM -0500, Tory S.
Anderson wrote: As I recall, Tramp (which you are using with C-x C-f) by default uses.authinfo or.authinfo.gpg, not.netrc. I've started using these and have been impressed (as of 2 hours in) That was my problem. Years ago I used ftp to transfer files, and so used /.netrc. I followed your suggestion and instead use /.authinfo, and how I have no problem accessing hosts on my LAN. When I try to access web servers via ssh, however, it does not work.
For example, in.authinfo I have this: machine uss-irex.info:/www login password So I do C-x C-f /uss-irex.info:/www and I'm prompted for the password. The password not accepted. If I do C-x C-f /: apparently the user is recognied because when I enter the password at prompt, but I'm told I lack permission.
Haines Brown writes: On Tue, Jan 13, 2015 at 09:29:59AM -0500, Tory S. Anderson wrote: I forgot to mention, I also found this handy (although I might be able to forego it with the authinfo trick): ;Cache passwords for one hour (setq password-cache-expiry 3600) I've made some progress, but still can't access the password in the /.netrc file.
More specifically, in emacs I do C-x C-f /user@anon: and get: Password for /ssh:user@anon: even though in /.netrc I have the stanza: machine user@anon login user password It seems the.netrc file not being read. Haines. Haines Brown wrote: That was my problem. Years ago I used ftp to transfer files, and so used /.netrc. I followed your suggestion and instead use /.authinfoand how I have no problem accessing hosts on my LAN.
I recommend using ssh rsa keys. Works great generically with ssh and isn't tramp specific. The tramp manual also recommends using the native transport mechanisms. When I try to access web servers via ssh, however, it does not work. For example, in.authinfo I have this: machine uss-irex.info:/www login password That 'uss-irex.info:/www' looks like a syntax error to me. Remove the ':/www' from it and try it again.
Nikolay Kudryavtsev writes: Tramp methods are defined in tramp. See C-h v tramp-methods. And did you mean scp? To save password in tramp you can put your login and password into a file called /.authinfo.gpg in this format: machine anon login root password my-password Nikolay, your advice much appreciated, and I did make progress.
I set the method to ssh in tramp initiation file. I now use /.authinfo and can readily log in to the remote LAN machine. However, this automated transmission of the password works only for users, not if the user is 'root'.
For example, if in /.authinfo I have the stanza: machine target login root password Geheim When in emacs I do C-x C-f /root@target: or /target:, I'm prompted for the password. The password was transmitted for user accounts but not for the root account. I need to ssh as root because my aim is to use emacs dired to copy files belonging to root between the target and the local machines. I can su to root and then start emacs, but this session for some reason does not use the tramp init file. The manual says I can use (set auth-source-debug `t). I put this line in my tramp init file, but where is its output? I here toss in an observation that is irrevant.
If the method is news, I find that the stanza in.authinfo must be inline, such as: machine news.giganews.com login Benutzer password Geheim If I arrange this in a column as in the 'target' example above, it does not work. Haines Authinfo is protected by gpg, so you gonna get asked for a password for itbut just once. Alternatively you can use authorization by key. I've taken almost six hours from pressing work to get tramp to access web servers, and have gotten nowhere. The tramp manual says that default authorization file is /.authinfo.gpg. I assume I can use /.authinfo until I get things working. When I use tramp in emcas (C-x C-f), I get a quick alert:.netrc is either not owned by you or badly protected.
The latter is the case. I have an old.netrc file with commented lines in it. I have impression the default tramp method is ftp, but if my C-x C-f command does not specify the method, the ssh method is instead used because in the tramp init file I specifid ftp as tramp's default method. I must access web servers with FTP, but I make ssh the defalt method because that's what I use to access hosts on my LAN. So when I access web servers I need to specify the ftp protocol. Man authinfo and info tramp do not tell me how to specify the method in the C-x C-f command, but I find by trial and error that I can manually log successfully with: C-x C-f /ftp:: However, to log in automatically, I must define method and user in the.authinfo file. I can specify user and pw for my LAN hosts, but apparently it does not work for web servers.
Thus the need to specify method and user in the command line. The tramp manual says my.authinfo line should look like this: machine server.com login Benutzer password Geheim But this does not work, for the password is nevertheless requested. If I insist by repeating the login, I can get this: ftp user 'Benutzer' 331 Password required for user Benutzer 530 Login incorrect ftp I rechecked with the web server, and its protocol is FTP, and my account name and PW are correct.
That I'm unable to log in automatically therefore suggests a synax error that prevents the info in.authinfo from being used. Ted Zlatanov writes: What does `auth-sources' contain? Turn `auth-source-debug' to 'trivia to see useful debug logs in.Messages. That will help you figure out what's going wrong, and what specifically is needed in the.authinfo file. Thanks, Ted, but I've made no progress. Auth-sources is new to me. I've managed for years without being aware of it.
I suppose that's because its defaults suited my needs. Now I'm variouly told it is both a library and a variable, which leaves me uncomfortable. I should start by describing my setup. I have several emacs init files depending on what I intend to do with an emacs session. In.fluxbox there is a key binding that starts an executable script named /scripts/emacs-util.
This file runs emacs with a specific init file that I named.emacsUtility. This init file has a variety of things in it, but includes these lines: (add-to-list 'load-path '/home/haines/.emacs.d/elisp/') (load-library 'tramp') This /.emacs.d/elisp/tramp is an init file that has only these lines: (set auth-source-debug `trivia) (setq tramp-default-method 'ssh') (require 'auth-source) (customize-variable 'auth-sources) The second line is because I use SSH most often with LAN hosts. The third and fourth lines probably unecessary. This nesting of init files worries me, but I didn't have a problem until recently. I now do C-x C-f /HostName.com: ssh: Could not resolve hostname HostName.com. Name or server not known Tramp: Waiting for prompts.
In.Messages. buffer: Loading tramp.
Done Tramp: Opening Connection for HostName.com using ssh Tramp: Sending command `exec ssh -e None HostName.com Beucase the web server wants the ftp protocol, my.authinfo file has the line: machine HostName.com port ftp login Benutzer password Geheim apparently this value for port is not seen. It seems the authinfo file not being accessed at all, although it is accessed when I SSH to LAN hosts. On Thu, 15 Jan 2015 15:26:54 -0500 Haines Brown wrote: HB Ted Zlatanov writes: What does `auth-sources' contain? Turn `auth-source-debug' to 'trivia to see useful debug logs in.Messages.
That will help you figure out what's going wrong, and what specifically is needed in the.authinfo file. HB Thanks, Ted, but I've made no progress. Auth-sources is new to me. I've HB managed for years without being aware of it. I suppose that's because HB its defaults suited my needs. Now I'm variouly told it is both a library HB and a variable, which leaves me uncomfortable. `auth-sources' is a variable (the `quoted' format is standard in the Emacs community).
So is `auth-source-debug'. Auth-source.el is a library. You may want to consult (info 'auth') to learn more about the library. HB This /.emacs.d/elisp/tramp is an init file that has only these lines: HB (set auth-source-debug `trivia) HB (setq tramp-default-method 'ssh') HB (require 'auth-source) HB (customize-variable 'auth-sources) HB The second line is because I use SSH most often with LAN hosts.
The HB third and fourth lines probably unecessary. Yes, the third is superfluous and the fourth is probably wrong. More importantly, (set auth-source-debug `trivia) is just wrong. You mean to use `setq' there, but you should just customize the variable: `M-x customize-variable RET auth-source-debug' Save the customization. Learn this method and use it for all variables you want to change. The interface is very helpful.
Do the same for `tramp-default-method' to set it to 'ssh' as you desire. There's no reason to run these only when you use Tramp. HB I now do C-x C-f /HostName.com: HB ssh: Could not resolve hostname HostName.com. Name or server not known HB Tramp: Waiting for prompts. HB In.Messages. buffer: HB Loading tramp.
Done HB Tramp: Opening Connection for HostName.com using ssh HB Tramp: Sending command `exec ssh -e None HostName.com Erm, you're using SSH in your example but we started with FTP. With SSH, this will have nothing to do with auth-source. SSH has its own authentication system, typically managed through ssh-agent and so on.
HB Beucase the web server wants the ftp protocol, my.authinfo file has the HB line: HB machine HostName.com port ftp login Benutzer password Geheim HB apparently this value for port is not seen. It seems the authinfo file HB not being accessed at all, although it is accessed when I SSH to LAN HB hosts.
Set `auth-source-debug' to 'trivia as requested, then open `/ftp:' and see what shows up in the.Messages. buffer (to see it, type `C-x b.Messages.' ).