ssh

Python code crashes with “cannot connect to X server” when detaching ssh+tmux session

↘锁芯ラ 提交于 2020-12-29 04:06:23
问题 I run Python code on a remote machine (which I ssh into) and then use Tmux. The code runs fine UNTIL I disconnect from the remote machine. The whole point of my connecting via Tmux is so that the code continues to run even when I'm not connected to the remote machine. When I reconnect later, I have the error message: : cannot connect to X server localhost:11.0 Does anyone have an idea why this is happening or how I can stop it? 回答1: cannot connect to X server localhost:11.0 ...means that your

Python code crashes with “cannot connect to X server” when detaching ssh+tmux session

↘锁芯ラ 提交于 2020-12-29 04:05:11
问题 I run Python code on a remote machine (which I ssh into) and then use Tmux. The code runs fine UNTIL I disconnect from the remote machine. The whole point of my connecting via Tmux is so that the code continues to run even when I'm not connected to the remote machine. When I reconnect later, I have the error message: : cannot connect to X server localhost:11.0 Does anyone have an idea why this is happening or how I can stop it? 回答1: cannot connect to X server localhost:11.0 ...means that your

Why is github asking me username/password although I setup SSH authentication?

房东的猫 提交于 2020-12-29 03:47:47
问题 I have followed these instructions to set up the SSH key for github. But now when I do > git pull Username for 'https://github.com': in a repository on the local computer I have taken the public SSH key from, I am still asked for a username/password. Did I miss a step? 回答1: You need to tell Git to use SSH protocol instead of HTTPS. On the repository page on GitHub, select Clone or Download and Use SSH . You will get a URL for the SSH protocol in the form git@github.com:<user>/<repo>.git .

Why is github asking me username/password although I setup SSH authentication?

本小妞迷上赌 提交于 2020-12-29 03:45:20
问题 I have followed these instructions to set up the SSH key for github. But now when I do > git pull Username for 'https://github.com': in a repository on the local computer I have taken the public SSH key from, I am still asked for a username/password. Did I miss a step? 回答1: You need to tell Git to use SSH protocol instead of HTTPS. On the repository page on GitHub, select Clone or Download and Use SSH . You will get a URL for the SSH protocol in the form git@github.com:<user>/<repo>.git .

What exactly is the git:// protocol?

一个人想着一个人 提交于 2020-12-28 13:09:29
问题 I was checking the ISO OSI chart where you can see the other two protocols git uses: https: ( this is http over ssl) and ssh but no mention of git:// Here is ISO OSI: https://en.wikipedia.org/wiki/OSI_model 回答1: The git protocol is a special daemon that comes packaged with Git; it listens on a dedicated port (9418) that provides a service similar to the SSH protocol, but with absolutely no authentication. It was introduced at the very beginning of Git, in commit 2386d65 (July 2005, Git 0.99.1

VScode remote connection error: The process tried to write to a nonexistent pipe

荒凉一梦 提交于 2020-12-28 06:56:36
问题 I use vscode with remote-ssh to connect my server, after configuring, I want to connect my host, but it failed, the dialog box display:"could not establish connection to XX, The process tried to write to a nonexistent pipe." output: [16:45:20.916] Log Level: 3 [16:45:20.936] remote-ssh@0.49.0 [16:45:20.936] win32 x64 [16:45:20.944] SSH Resolver called for "ssh-remote+aliyun", attempt 1 [16:45:20.945] SSH Resolver called for host: aliyun [16:45:20.945] Setting up SSH remote "aliyun" [16:45:21

VScode remote connection error: The process tried to write to a nonexistent pipe

心不动则不痛 提交于 2020-12-28 06:52:17
问题 I use vscode with remote-ssh to connect my server, after configuring, I want to connect my host, but it failed, the dialog box display:"could not establish connection to XX, The process tried to write to a nonexistent pipe." output: [16:45:20.916] Log Level: 3 [16:45:20.936] remote-ssh@0.49.0 [16:45:20.936] win32 x64 [16:45:20.944] SSH Resolver called for "ssh-remote+aliyun", attempt 1 [16:45:20.945] SSH Resolver called for host: aliyun [16:45:20.945] Setting up SSH remote "aliyun" [16:45:21

Github Actions: xcodebuild fails due to server fingerprint

人走茶凉 提交于 2020-12-26 06:33:52
问题 I am trying to build a macOS app with Github Actions. This already worked very well, until I migrated my dependencies to Swift Package Manager. Now I am getting the following error while building my app: xcodebuild: error: Could not resolve package dependencies: The server SSH fingerprint failed to verify. I have a private GitHub repository as a dependeny in my application added as a Swift Package using a ssh location. Therefore I need to add my ssh key for the dependency in the Set up ssh

Github Actions: xcodebuild fails due to server fingerprint

不羁岁月 提交于 2020-12-26 06:28:01
问题 I am trying to build a macOS app with Github Actions. This already worked very well, until I migrated my dependencies to Swift Package Manager. Now I am getting the following error while building my app: xcodebuild: error: Could not resolve package dependencies: The server SSH fingerprint failed to verify. I have a private GitHub repository as a dependeny in my application added as a Swift Package using a ssh location. Therefore I need to add my ssh key for the dependency in the Set up ssh

Pass dict as an argument over SSH to Python script

烂漫一生 提交于 2020-12-25 19:04:09
问题 I am trying to pass dict arguments using the ssh command via the os module: os.system(f'ssh remote_host python -u - {dict1} {dict2} < local_script.py') I am getting an error: sh:line:0 syntax error near unexpected token (' What is the right syntax to pass dict as an argument? If I pass string instead of dict, it works fine. Any suggestions? 回答1: Use json and urlencode. import urllib.parse import json dict1_j = urllib.parse.quote(json.dumps(dict1)) dict2_j = urllib.parse.quote(json.dumps(dict2