coder / sshcode

Run VS Code on any server over SSH.
MIT License
5.74k stars 215 forks source link

v0.8.0 - error: failed to update code-server #139

Open magick93 opened 5 years ago

magick93 commented 5 years ago

Hello

I'm trying to connect from a Ubuntu 18.04 to another Ubuntu 18.04 box, but sshcode fails with the following:

sshcode anton@jumphost                        
2019-09-10 11:58:55 INFO    ensuring code-server is updated...
2019-09-10 11:58:56 FATAL   error: failed to update code-server: 
---ssh cmd---
ssh  anton@jumphost /bin/bash
---download script---
set -euxo pipefail || exit 1

pkill -f ~/.cache/sshcode/sshcode-server || true
mkdir -p ~/.local/share/code-server ~/.cache/sshcode
cd ~/.cache/sshcode
wget -N https://codesrv-ci.cdr.sh/latest-linux
[ -f ~/.cache/sshcode/sshcode-server ] && rm ~/.cache/sshcode/sshcode-server
ln latest-linux ~/.cache/sshcode/sshcode-server
chmod +x ~/.cache/sshcode/sshcode-server: exit status 1
deansheather commented 5 years ago

Could you please make sure that wget is installed on the remote machine?

magick93 commented 5 years ago

Hi @deansheather

wget is already installed on both local and remote machines.

chm-dev commented 5 years ago

Having similar issue trying to start from local wsl.

Downloaded manually the binary on a remote debian using curl as in script and even put it to ~/.cache/sshcode/sshcode-server and it works no problem.

This is what i am getting in the local wsl terminal (replaced remote host domain though).

chm@DESKTOP-BSOTAS3:~/go/bin$ ./sshcode daemons@myhost "/home/daemons/project"
2019-09-11 00:54:57 INFO        starting SSH master connection...
daemons@myhost's password:
2019-09-11 00:55:01 INFO        ensuring code-server is updated...
sh: 29: export: Files/Docker/Docker/Resources/bin:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Program: bad
variable name
2019-09-11 00:55:01 FATAL       error: failed to update code-server:
---ssh cmd---
ssh  -o "ControlPath=~/.ssh/control-%h-%p-%r" daemons@myhost '/usr/bin/env bash -l'
---download script---
set -euxo pipefail || exit 1

[ "$(uname -m)" != "x86_64" ] && echo "Unsupported server architecture $(uname -m). code-server only has releases for x86_64 systems." && exit 1
pkill -f ~/.cache/sshcode/sshcode-server || true
mkdir -p ~/.local/share/code-server ~/.cache/sshcode
cd ~/.cache/sshcode
curlflags="-o latest-linux"
if [ -f latest-linux ]; then
        curlflags="$curlflags -z latest-linux"
fi
curl $curlflags https://codesrv-ci.cdr.sh/latest-linux
[ -f ~/.cache/sshcode/sshcode-server ] && rm ~/.cache/sshcode/sshcode-server
ln latest-linux ~/.cache/sshcode/sshcode-server
chmod +x ~/.cache/sshcode/sshcode-server: exit status 2

The problem seems to be the space in "Program Files",in the export bit which is not in quotes. But i guess this is why windows is not supported :)

deansheather commented 5 years ago

Yeah, unfourtunately WSL isn't supported at this time. There are a few quirks with the way WSL converts between paths, which I'll try to tackle today after I setup this WSL server.

deansheather commented 5 years ago

Strangely enough, I didn't have any problems when I tried this (both with and without a directory). I'm using Windows Server 2019, with WSL enabled and Ubuntu 18.04 installed. Built sshcode master branch using golang v1.10.4 from apt.

It seems like the issue you're experiencing could be caused by a bad export statement in your shell profile/rc file. sshcode uses sh to run the ssh commands, similarly to ssh -c "ssh blah".

Screenshot

deansheather commented 5 years ago

@magick93 could you please try building sshcode's master branch and see if that works? There are changes since the last release to the upgrade script, which could fix the problem you're having.

The current release is pretty old, but we're going to release a new version tomorrow if you don't want to build it yourself.

chm-dev commented 5 years ago

Just out of curiosity I replaced all folder names with spaces in PATH to their old MSDOS versions and it all worked.

image

It is ugly as hell but if someone is really desperate it is kind of workaround, I guess ;)

deansheather commented 5 years ago

Seems like a problem with the sh included with WSL in that case. There's probably no way for us to workaround this, except for not calling sh and calling ssh directly.

foxsam21 commented 5 years ago

The same (looks like) thing is happening to me connecting to a "Linux Mint 18 Sarah" machine. I am getting the following output:

2019-09-27 09:11:33 INFO    starting SSH master connection...
2019-09-27 09:12:04 ERROR   failed to start SSH master connection: SSH master wasn't ready on time: max number of tries exceeded: 30
2019-09-27 09:12:04 INFO    ensuring code-server is updated...
++ uname -m
+ '[' x86_64 '!=' x86_64 ']'
+ pkill -f /home/<user>/.cache/sshcode/sshcode-server
+ true
+ mkdir -p /home/<user>/.local/share/code-server /home/<user>/.cache/sshcode
+ cd /home/<user>/.cache/sshcode
+ __zsh_like_cd cd /home/<user>/.cache/sshcode
+ typeset __zsh_like_cd_hook
+ builtin cd /home/<user>/.cache/sshcode
+ for __zsh_like_cd_hook in chpwd '"${chpwd_functions[@]}"'
+ typeset -f chpwd
+ for __zsh_like_cd_hook in chpwd '"${chpwd_functions[@]}"'
+ typeset -f __rvm_cd_functions_set
+ __rvm_cd_functions_set
+ __rvm_do_with_env_before
+ [[ -n '' ]]
+ [[ -n /home/<user>/.rvm ]]
+ source /home/<user>/.rvm/scripts/initialize
++ [[ -n 4.3.48(1)-release ]]
++ shopt -s extglob
++ ((  0 == 1  ))
++ export __rvm_env_loaded
++ : __rvm_env_loaded:0:
++ : __rvm_env_loaded:1:
++ [[ -z '' ]]
++ typeset -f __rvm_cleanse_variables
++ __rvm_cleanse_variables
++ __rvm_unset_ruby_variables
++ unset rvm_env_string rvm_ruby_string rvm_ruby_strings rvm_ruby_binary rvm_ruby_gem_home rvm_ruby_gem_path rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_log_path rvm_ruby_major_version rvm_ruby_minor_version rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_repo_branch rvm_ruby_revision rvm_ruby_selected_flag rvm_ruby_tag rvm_ruby_version rvm_head_flag rvm_ruby_package_file rvm_ruby_configure rvm_ruby_name rvm_ruby_url rvm_ruby_global_gems_path rvm_ruby_args rvm_ruby_name rvm_llvm_flag
++ __rvm_load_rvmrc
++ typeset _file
++ typeset -a rvm_rvmrc_files
++ ((  0 == 1  ))
++ [[ -n 0002 ]]
++ rvm_rvmrc_files=("/etc/rvmrc" "$HOME/.rvmrc")
++ [[ -n /home/<user> ]]
++ [[ /home/<user>/.rvmrc -ef /home/<user>/.rvmrc ]]
++ rvm_rvmrc_files+=("${rvm_prefix}/.rvmrc")
++ for _file in '"${rvm_rvmrc_files[@]}"'
++ [[ -s /etc/rvmrc ]]
++ for _file in '"${rvm_rvmrc_files[@]}"'
++ [[ -s /home/<user>/.rvmrc ]]
++ for _file in '"${rvm_rvmrc_files[@]}"'
++ [[ -s /home/<user>/.rvmrc ]]
++ return 0
++ [[ 0 -eq 1 ]]
++ unset rvm_gemset_name
++ unset rvm_configure_flags rvm_patch_names rvm_make_flags
++ unset rvm_env_string rvm_ruby_string rvm_action rvm_error_message rvm_force_flag rvm_debug_flag rvm_delete_flag rvm_summary_flag rvm_json_flag rvm_yaml_flag rvm_file_name rvm_user_flag rvm_system_flag rvm_install_flag rvm_llvm_flag rvm_sticky_flag rvm_rvmrc_flag rvm_gems_flag rvm_docs_flag rvm_ruby_alias rvm_static_flag rvm_archive_extension rvm_hook rvm_ruby_name rvm_remote_flag
++ __rvm_load_rvmrc
++ typeset _file
++ typeset -a rvm_rvmrc_files
++ ((  0 == 1  ))
++ [[ -n 0002 ]]
++ rvm_rvmrc_files=("/etc/rvmrc" "$HOME/.rvmrc")
++ [[ -n /home/<user> ]]
++ [[ /home/<user>/.rvmrc -ef /home/<user>/.rvmrc ]]
++ rvm_rvmrc_files+=("${rvm_prefix}/.rvmrc")
++ for _file in '"${rvm_rvmrc_files[@]}"'
++ [[ -s /etc/rvmrc ]]
++ for _file in '"${rvm_rvmrc_files[@]}"'
++ [[ -s /home/<user>/.rvmrc ]]
++ for _file in '"${rvm_rvmrc_files[@]}"'
++ [[ -s /home/<user>/.rvmrc ]]
++ return 0
++ ((  0 == 0  ))
++ [[ -n 0002 ]]
++ rvm_rvmrc_files=("/etc/rvmrc" "$HOME/.rvmrc")
++ [[ -n /home/<user> ]]
++ [[ /home/<user>/.rvmrc -ef /home/<user>/.rvmrc ]]
++ rvm_rvmrc_files+=("${rvm_prefix}/.rvmrc")
++ for rvmrc in '"${rvm_rvmrc_files[@]}"'
++ [[ -f /etc/rvmrc ]]
++ for rvmrc in '"${rvm_rvmrc_files[@]}"'
++ [[ -f /home/<user>/.rvmrc ]]
++ for rvmrc in '"${rvm_rvmrc_files[@]}"'
++ [[ -f /home/<user>/.rvmrc ]]
++ unset rvm_rvmrc_files
++ export rvm_path
++ [[ -z /home/<user>/.rvm ]]
++ true /home/<user>/.rvm/scripts
++ [[ -n 1 ]]
++ export rvm_user_install_flag
++ : rvm_bin_path:/home/<user>/.rvm/bin rvm_man_path:/home/<user>/.rvm/share/man rvm_archives_path:/home/<user>/.rvm/archives rvm_docs_path:/home/<user>/.rvm/docs rvm_environments_path:/home/<user>/.rvm/environments rvm_examples_path:/home/<user>/.rvm/examples rvm_gems_path:/home/<user>/.rvm/gems rvm_gemsets_path:/home/<user>/.rvm/gemsets rvm_help_path:/home/<user>/.rvm/help rvm_docs_path:/home/<user>/.rvm/docs rvm_hooks_path:/home/<user>/.rvm/hooks rvm_lib_path:/home/<user>/.rvm/lib rvm_log_path:/home/<user>/.rvm/log rvm_patches_path:/home/<user>/.rvm/patches rvm_repos_path:/home/<user>/.rvm/repos rvm_rubies_path:/home/<user>/.rvm/rubies rvm_rubygems_path:/home/<user>/.rvm/rubygems rvm_src_path:/home/<user>/.rvm/src rvm_tmp_path:/home/<user>/.rvm/tmp rvm_user_path:/home/<user>/.rvm/user rvm_usr_path:/home/<user>/.rvm/usr rvm_wrappers_path:/home/<user>/.rvm/wrappers rvm_verbose_flag:0 rvm_debug_flag:0 rvm_gems_cache_path:/home/<user>/.rvm/gems/cache
++ export rvm_action rvm_alias_expanded rvm_archive_extension rvm_archives_path rvm_bin_flag rvm_bin_path rvm_debug_flag rvm_default_flag rvm_delete_flag rvm_docs_path rvm_docs_type rvm_dump_environment_flag rvm_environments_path rvm_error_message rvm_examples_path rvm_expanding_aliases rvm_file_name rvm_gemdir_flag rvm_gems_cache_path rvm_gems_path rvm_gemset_name rvm_gemset_separator rvm_gemsets_path rvm_gemstone_package_file rvm_gemstone_url rvm_head_flag rvm_help_path rvm_docs_path rvm_hook rvm_hooks_path rvm_install_on_use_flag rvm_lib_path rvm_llvm_flag rvm_loaded_flag rvm_log_path rvm_niceness rvm_nightly_flag rvm_only_path_flag rvm_parse_break rvm_patch_original_pwd rvm_patches_path rvm_path rvm_pretty_print_flag rvm_proxy rvm_quiet_flag rvm_reload_flag rvm_remove_flag rvm_repos_path rvm_rubies_path rvm_ruby_alias rvm_ruby_args rvm_ruby_binary rvm_ruby_bits rvm_ruby_configure rvm_ruby_file rvm_ruby_gem_home rvm_ruby_gem_path rvm_ruby_global_gems_path rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_major_version rvm_ruby_make rvm_ruby_make_install rvm_ruby_minor_version rvm_ruby_mode rvm_ruby_name rvm_ruby_package_file rvm_ruby_package_name rvm_ruby_patch rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_revision rvm_ruby_selected_flag rvm_ruby_sha rvm_ruby_string rvm_ruby_strings rvm_ruby_tag rvm_ruby_url rvm_ruby_user_tag rvm_ruby_version rvm_script_name rvm_scripts_path rvm_sdk rvm_user_install_flag rvm_silent_flag rvm_src_path rvm_sticky_flag rvm_system_flag rvm_tmp_path rvm_token rvm_trace_flag rvm_use_flag rvm_user_flag rvm_user_path rvm_usr_path rvm_verbose_flag rvm_wrapper_name rvm_wrappers_path rvm_ruby_repo_branch rvm_man_path rvm_remote_flag
+ __rvm_setup
+ __variables_definition export
+ typeset -a __variables_list __array_list
+ typeset __method
+ __method=export
+ __variables_list=(rvm_head_flag rvm_ruby_selected_flag rvm_user_install_flag rvm_path_flag rvm_cron_flag rvm_static_flag rvm_default_flag rvm_loaded_flag rvm_llvm_flag rvm_skip_autoreconf_flag rvm_dynamic_extensions_flag rvm_18_flag rvm_19_flag rvm_20_flag rvm_21_flag rvm_force_autoconf_flag rvm_dump_environment_flag rvm_curl_flags rvm_rubygems_version rvm_verbose_flag rvm_debug_flag rvm_trace_flag __array_start rvm_skip_pristine_flag rvm_create_flag rvm_remove_flag rvm_movable_flag rvm_archive_flag rvm_gemdir_flag rvm_reload_flag rvm_auto_reload_flag rvm_disable_binary_flag rvm_ignore_gemsets_flag rvm_skip_gemsets_flag rvm_install_on_use_flag rvm_remote_flag rvm_verify_downloads_flag rvm_skip_openssl_flag rvm_gems_cache_path rvm_gems_path rvm_man_path rvm_ruby_gem_path rvm_ruby_log_path rvm_gems_cache_path rvm_archives_path rvm_docs_path rvm_environments_path rvm_examples_path rvm_gems_path rvm_gemsets_path rvm_help_path rvm_hooks_path rvm_lib_path rvm_log_path rvm_patches_path rvm_repos_path rvm_rubies_path rvm_scripts_path rvm_src_path rvm_tmp_path rvm_user_path rvm_usr_path rvm_wrappers_path rvm_stored_errexit rvm_ruby_strings rvm_ruby_binary rvm_ruby_gem_home rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_major_version rvm_ruby_minor_version rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_repo_branch rvm_ruby_revision rvm_ruby_tag rvm_ruby_sha rvm_ruby_version rvm_ruby_package_file rvm_ruby_name rvm_ruby_name rvm_ruby_args rvm_ruby_user_tag rvm_ruby_patch detected_rvm_ruby_name __rvm_env_loaded next_token rvm_error_message rvm_gemset_name rvm_parse_break rvm_token rvm_action rvm_export_args rvm_gemset_separator rvm_expanding_aliases rvm_tar_command rvm_tar_options rvm_patch_original_pwd rvm_project_rvmrc rvm_archive_extension rvm_autoinstall_bundler_flag rvm_codesign_identity rvm_expected_gemset_name rvm_without_gems rvm_with_gems rvm_with_default_gems rvm_ignore_dotfiles_flag rvm_fuzzy_flag rvm_autolibs_flag rvm_autolibs_flag_number rvm_autolibs_flag_runner rvm_quiet_curl_flag rvm_max_time_flag rvm_error_clr rvm_warn_clr rvm_debug_clr rvm_notify_clr rvm_reset_clr rvm_error_color rvm_warn_color rvm_debug_color rvm_notify_color rvm_reset_color rvm_log_timestamp rvm_log_filesystem rvm_log_namelen rvm_show_log_lines_on_error)
+ __array_list=(rvm_patch_names rvm_ree_options rvm_autoconf_flags rvm_architectures)
+ case "${__method}" in
+ true
+ export rvm_head_flag rvm_ruby_selected_flag rvm_user_install_flag rvm_path_flag rvm_cron_flag rvm_static_flag rvm_default_flag rvm_loaded_flag rvm_llvm_flag rvm_skip_autoreconf_flag rvm_dynamic_extensions_flag rvm_18_flag rvm_19_flag rvm_20_flag rvm_21_flag rvm_force_autoconf_flag rvm_dump_environment_flag rvm_curl_flags rvm_rubygems_version rvm_verbose_flag rvm_debug_flag rvm_trace_flag __array_start rvm_skip_pristine_flag rvm_create_flag rvm_remove_flag rvm_movable_flag rvm_archive_flag rvm_gemdir_flag rvm_reload_flag rvm_auto_reload_flag rvm_disable_binary_flag rvm_ignore_gemsets_flag rvm_skip_gemsets_flag rvm_install_on_use_flag rvm_remote_flag rvm_verify_downloads_flag rvm_skip_openssl_flag rvm_gems_cache_path rvm_gems_path rvm_man_path rvm_ruby_gem_path rvm_ruby_log_path rvm_gems_cache_path rvm_archives_path rvm_docs_path rvm_environments_path rvm_examples_path rvm_gems_path rvm_gemsets_path rvm_help_path rvm_hooks_path rvm_lib_path rvm_log_path rvm_patches_path rvm_repos_path rvm_rubies_path rvm_scripts_path rvm_src_path rvm_tmp_path rvm_user_path rvm_usr_path rvm_wrappers_path rvm_stored_errexit rvm_ruby_strings rvm_ruby_binary rvm_ruby_gem_home rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_major_version rvm_ruby_minor_version rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_repo_branch rvm_ruby_revision rvm_ruby_tag rvm_ruby_sha rvm_ruby_version rvm_ruby_package_file rvm_ruby_name rvm_ruby_name rvm_ruby_args rvm_ruby_user_tag rvm_ruby_patch detected_rvm_ruby_name __rvm_env_loaded next_token rvm_error_message rvm_gemset_name rvm_parse_break rvm_token rvm_action rvm_export_args rvm_gemset_separator rvm_expanding_aliases rvm_tar_command rvm_tar_options rvm_patch_original_pwd rvm_project_rvmrc rvm_archive_extension rvm_autoinstall_bundler_flag rvm_codesign_identity rvm_expected_gemset_name rvm_without_gems rvm_with_gems rvm_with_default_gems rvm_ignore_dotfiles_flag rvm_fuzzy_flag rvm_autolibs_flag rvm_autolibs_flag_number rvm_autolibs_flag_runner rvm_quiet_curl_flag rvm_max_time_flag rvm_error_clr rvm_warn_clr rvm_debug_clr rvm_notify_clr rvm_reset_clr rvm_error_color rvm_warn_color rvm_debug_color rvm_notify_color rvm_reset_color rvm_log_timestamp rvm_log_filesystem rvm_log_namelen rvm_show_log_lines_on_error
+ [[ -n 4.3.48(1)-release ]]
+ export -fn __rvm_select_version_variables __rvm_ruby_string_parse_ __rvm_rm_rf_verbose __rvm_parse_args
+ ((  __rvm_env_loaded != 1  ))
+ [[ -n 4.3.48(1)-release ]]
+ __function_on_stack cd pushd popd
+ __rvm_string_includes '__function_on_stack __rvm_setup __rvm_do_with_env_before __rvm_cd_functions_set __zsh_like_cd cd' cd pushd popd
+ typeset __search '__text=__function_on_stack __rvm_setup __rvm_do_with_env_before __rvm_cd_functions_set __zsh_like_cd cd'
+ shift
+ for __search in '"$@"'
+ [[  __function_on_stack __rvm_setup __rvm_do_with_env_before __rvm_cd_functions_set __zsh_like_cd cd  == *\ \c\d\ * ]]
+ return 0
+ [[ -n '' ]]
+ [[ -n '' ]]
+ __rvm_project_rvmrc
+ export __rvm_project_rvmrc_lock
+ : __rvm_project_rvmrc_lock:0
+ : __rvm_project_rvmrc_lock:1
+ ((  __rvm_project_rvmrc_lock > 1  ))
+ typeset working_dir found_file rvm_trustworthiness_result save_PATH
+ working_dir=/home/<user>/.cache/sshcode
+ save_PATH=/home/<user>/.rvm/gems/ruby-2.4.1/bin:/home/<user>/.rvm/gems/ruby-2.4.1@global/bin:/home/<user>/.rvm/rubies/ruby-2.4.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/<user>/.rvm/bin
+ :
+ [[ -z /home/<user>/.cache/sshcode ]]
+ [[ /home/<user> == \/\h\o\m\e\/\< u s e r >\/\.\c\a\c\h\e\/\s\s\h\c\o\d\e ]]
+ [[ /home/<user> == \/\h\o\m\e\/\< u s e r >\1\/\.\c\a\c\h\e\/\s\s\h\c\o\d\e ]]
+ [[ /home/<user>/.cache/sshcode == \. ]]
+ __rvm_project_dir_check /home/<user>/.cache/sshcode found_file
+ typeset _found_file path_to_check variable variable_default
+ typeset -a _valid_files
+ path_to_check=/home/<user>/.cache/sshcode
+ variable=found_file
+ variable_default=
+ _valid_files=("$path_to_check" "$path_to_check/.rvmrc" "$path_to_check/.versions.conf" "$path_to_check/.ruby-version" "$path_to_check/.rbfu-version" "$path_to_check/.rbenv-version" "$path_to_check/Gemfile")
+ __rvm_find_first_file _found_file /home/<user>/.cache/sshcode /home/<user>/.cache/sshcode/.rvmrc /home/<user>/.cache/sshcode/.versions.conf /home/<user>/.cache/sshcode/.ruby-version /home/<user>/.cache/sshcode/.rbfu-version /home/<user>/.cache/sshcode/.rbenv-version /home/<user>/.cache/sshcode/Gemfile
+ typeset _first_file _variable_first_file __file_enum
+ _first_file=
+ _variable_first_file=_found_file
+ shift
+ for __file_enum in '"$@"'
+ [[ -f /home/<user>/.cache/sshcode ]]
+ for __file_enum in '"$@"'
+ [[ -f /home/<user>/.cache/sshcode/.rvmrc ]]
+ for __file_enum in '"$@"'
+ [[ -f /home/<user>/.cache/sshcode/.versions.conf ]]
+ for __file_enum in '"$@"'
+ [[ -f /home/<user>/.cache/sshcode/.ruby-version ]]
+ for __file_enum in '"$@"'
+ [[ -f /home/<user>/.cache/sshcode/.rbfu-version ]]
+ for __file_enum in '"$@"'
+ [[ -f /home/<user>/.cache/sshcode/.rbenv-version ]]
+ for __file_enum in '"$@"'
+ [[ -f /home/<user>/.cache/sshcode/Gemfile ]]
+ eval '_found_file=""'
++ _found_file=
+ return 1
+ true
+ [[ '' == \G\e\m\f\i\l\e ]]
+ [[ '' == \/\h\o\m\e\/\t\h\i\n\g\1\/\.\r\v\m\r\c ]]
+ [[ -n found_file ]]
+ eval 'found_file="${_found_file:-}"'
++ found_file=
+ [[ -n '' ]]
+ typeset __result=1
+ unset RVM_PROJECT_PATH
+ return 1
+ working_dir=/home/<user>/.cache
+ :
+ [[ -z /home/<user>/.cache ]]
+ [[ /home/<user> == \/\h\o\m\e\/\t\h\i\n\g\1\/\.\c\a\c\h\e ]]
+ [[ /home/<user> == \/\h\o\m\e\/\t\h\i\n\g\1\/\.\c\a\c\h\e ]]
+ [[ /home/<user>/.cache == \. ]]
+ __rvm_project_dir_check /home/<user>/.cache found_file
+ typeset _found_file path_to_check variable variable_default
+ typeset -a _valid_files
+ path_to_check=/home/<user>/.cache
+ variable=found_file
+ variable_default=
+ _valid_files=("$path_to_check" "$path_to_check/.rvmrc" "$path_to_check/.versions.conf" "$path_to_check/.ruby-version" "$path_to_check/.rbfu-version" "$path_to_check/.rbenv-version" "$path_to_check/Gemfile")
+ __rvm_find_first_file _found_file /home/<user>/.cache /home/<user>/.cache/.rvmrc /home/<user>/.cache/.versions.conf /home/<user>/.cache/.ruby-version /home/<user>/.cache/.rbfu-version /home/<user>/.cache/.rbenv-version /home/<user>/.cache/Gemfile
+ typeset _first_file _variable_first_file __file_enum
+ _first_file=
+ _variable_first_file=_found_file
+ shift
+ for __file_enum in '"$@"'
+ [[ -f /home/<user>/.cache ]]
+ for __file_enum in '"$@"'
+ [[ -f /home/<user>/.cache/.rvmrc ]]
+ for __file_enum in '"$@"'
+ [[ -f /home/<user>/.cache/.versions.conf ]]
+ for __file_enum in '"$@"'
+ [[ -f /home/<user>/.cache/.ruby-version ]]
+ for __file_enum in '"$@"'
+ [[ -f /home/<user>/.cache/.rbfu-version ]]
+ for __file_enum in '"$@"'
+ [[ -f /home/<user>/.cache/.rbenv-version ]]
+ for __file_enum in '"$@"'
+ [[ -f /home/<user>/.cache/Gemfile ]]
+ eval '_found_file=""'
++ _found_file=
+ return 1
+ true
+ [[ '' == \G\e\m\f\i\l\e ]]
+ [[ '' == \/\h\o\m\e\/\t\h\i\n\g\1\/\.\r\v\m\r\c ]]
+ [[ -n found_file ]]
+ eval 'found_file="${_found_file:-}"'
++ found_file=
+ [[ -n '' ]]
+ typeset __result=1
+ unset RVM_PROJECT_PATH
+ return 1
+ working_dir=/home/<user>
+ :
+ [[ -z /home/<user> ]]
+ [[ /home/<user> == \/\h\o\m\e\/\t\h\i\n\g\1 ]]
+ ((  0 >= 1  ))
+ [[ -n '' ]]
+ __rvm_file_env_check_unload
+ ((  0 > 0  ))
+ rvm_saved_env=()
+ unset rvm_current_rvmrc rvm_previous_environment
+ break
+ unset __rvm_project_rvmrc_lock
+ return 1
+ true
+ __rvm_after_cd
+ typeset rvm_hook
+ rvm_hook=after_cd
+ [[ -n /home/<user>/.rvm/scripts ]]
+ source /home/<user>/.rvm/scripts/hook
++ typeset old_rvm_verbose_flag old_rvm_debug_flag
++ old_rvm_verbose_flag=0
++ old_rvm_debug_flag=0
++ typeset rvm_verbose_flag rvm_debug_flag hooks
++ true rvm_verbose_flag:0 rvm_hooks_path:/home/<user>/.rvm/hooks rvm_debug_flag:0 rvm_hook:after_cd
++ [[ -n after_cd ]]
++ hooks=()
++ [[ -d /home/<user>/.rvm/hooks ]]
++ hooks+=("$rvm_hooks_path")
++ [[ /home/<user>/.cache/sshcode/.rvm/hooks != \/\h\o\m\e\/\t\h\i\n\g\1\/\.\r\v\m\/\h\o\o\k\s ]]
++ [[ -d /home/<user>/.cache/sshcode/.rvm/hooks ]]
++ [[ -n /home/<user>/.rvm/hooks ]]
++ __rvm_read_lines _hooks_list /dev/fd/63
++ typeset IFS
++ IFS='
'
++ [[ /dev/fd/63 == \- ]]
++ eval '_hooks_list=( $( \command \cat "${2:--}" ) )'
+++ _hooks_list=($( \command \cat "${2:--}" ))
+++ __rvm_find -L /home/<user>/.rvm/hooks -iname 'after_cd*' -type f
++++ command cat /dev/fd/63
++++ cat /dev/fd/63
++ for hook in '"${_hooks_list[@]}"'
++ [[ -x /home/<user>/.rvm/hooks/after_cd_bundler ]]
++ [[ after_cd_bundler == \a\f\t\e\r\_\c\d ]]
++ for hook in '"${_hooks_list[@]}"'
++ [[ -x /home/<user>/.rvm/hooks/after_cd_install_vendored_gems ]]
++ [[ after_cd_install_vendored_gems == \a\f\t\e\r\_\c\d ]]
++ unset rvm_hook hooks _hooks_list hook
+ __rvm_do_with_env_after
+ __rvm_teardown
+ builtin command -v __rvm_cleanup_tmp
+ __rvm_cleanup_tmp
+ [[ -d /home/<user>/.rvm/tmp/ ]]
+ case "${rvm_tmp_path%\/}" in
+ __rvm_rm_rf '/home/<user>/.rvm/tmp/10256*'
+ __rvm_rm_rf_verbose '/home/<user>/.rvm/tmp/10256*'
+ typeset target
+ target='/home/<user>/.rvm/tmp/10256*'
+ [[ -n '' ]]
+ [[ -n 4.3.48(1)-release ]]
+ builtin shopt -s extglob
+ case "${target}" in
+ [[ -z /home/<user>/.rvm/tmp/10256* ]]
+ [[ -d /home/<user>/.rvm/tmp/10256* ]]
+ [[ -f /home/<user>/.rvm/tmp/10256* ]]
+ [[ -L /home/<user>/.rvm/tmp/10256* ]]
+ rvm_debug '__rvm_rm_rf already gone: /home/<user>/.rvm/tmp/10256*'
+ ((  0  ))
+ return 0
+ true
+ true
+ export __rvm_env_loaded
+ : __rvm_env_loaded:1:
+ : __rvm_env_loaded:1:
+ : __rvm_env_loaded:0:
+ [[ -z /home/<user>/.rvm/tmp ]]
+ ((  __rvm_env_loaded > 0  ))
+ [[ -n 4.3.48(1)-release ]]
+ trap - EXIT HUP INT QUIT TERM
+ is_a_function shell_session_update
+ typeset -f shell_session_update
+ return 1
+ ((  rvm_bash_nounset == 1  ))
/home/<user>/.rvm/scripts/functions/environment: line 265: rvm_bash_nounset: unbound variable
2019-09-27 09:12:08 ERROR   failed to send SIGTERM to SSH master process: os: process already finished
2019-09-27 09:12:08 FATAL   error: failed to update code-server:
---ssh cmd---
ssh  <user>@<host> '/usr/bin/env bash -l'
---download script---
set -euxo pipefail || exit 1

[ "$(uname -m)" != "x86_64" ] && echo "Unsupported server architecture $(uname -m). code-server only has releases for x86_64 systems." && exit 1
pkill -f ~/.cache/sshcode/sshcode-server || true
mkdir -p ~/.local/share/code-server ~/.cache/sshcode
cd ~/.cache/sshcode
curlflags="-o latest-linux"
if [ -f latest-linux ]; then
    curlflags="$curlflags -z latest-linux"
fi
curl $curlflags https://codesrv-ci.cdr.sh/latest-linux
[ -f ~/.cache/sshcode/sshcode-server ] && rm ~/.cache/sshcode/sshcode-server
ln latest-linux ~/.cache/sshcode/sshcode-server
chmod +x ~/.cache/sshcode/sshcode-server: exit status 1
deansheather commented 5 years ago

Could you try disabling rvm (remove it entirely from your .bashrc) and try again?

On Fri, Sep 27, 2019 at 1:15 PM foxsam21 notifications@github.com wrote:

The same (looks like) thing is happening to me connecting to a "Linux Mint 18 Sarah" machine. I am getting the following output:

2019-09-27 09:11:33 INFO starting SSH master connection... 2019-09-27 09:12:04 ERROR failed to start SSH master connection: SSH master wasn't ready on time: max number of tries exceeded: 30 2019-09-27 09:12:04 INFO ensuring code-server is updated... ++ uname -m

  • '[' x86_64 '!=' x86_64 ']'
  • pkill -f /home//.cache/sshcode/sshcode-server
  • true
  • mkdir -p /home//.local/share/code-server /home//.cache/sshcode
  • cd /home//.cache/sshcode
  • __zsh_like_cd cd /home//.cache/sshcode
  • typeset __zsh_like_cd_hook
  • builtin cd /home//.cache/sshcode
  • for __zsh_like_cd_hook in chpwd '"${chpwd_functions[@]}"'
  • typeset -f chpwd
  • for __zsh_like_cd_hook in chpwd '"${chpwd_functions[@]}"'
  • typeset -f __rvm_cd_functions_set
  • __rvm_cd_functions_set
  • __rvm_do_with_env_before
  • [[ -n '' ]]
  • [[ -n /home//.rvm ]]
  • source /home//.rvm/scripts/initialize ++ [[ -n 4.3.48(1)-release ]] ++ shopt -s extglob ++ (( 0 == 1 )) ++ export rvm_env_loaded ++ : rvm_env_loaded:0: ++ : rvm_env_loaded:1: ++ [[ -z '' ]] ++ typeset -f rvm_cleanse_variables ++ rvm_cleanse_variables ++ rvm_unset_ruby_variables ++ unset rvm_env_string rvm_ruby_string rvm_ruby_strings rvm_ruby_binary rvm_ruby_gem_home rvm_ruby_gem_path rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_log_path rvm_ruby_major_version rvm_ruby_minor_version rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_repo_branch rvm_ruby_revision rvm_ruby_selected_flag rvm_ruby_tag rvm_ruby_version rvm_head_flag rvm_ruby_package_file rvm_ruby_configure rvm_ruby_name rvm_ruby_url rvm_ruby_global_gems_path rvm_ruby_args rvm_ruby_name rvm_llvm_flag ++ __rvm_load_rvmrc ++ typeset _file ++ typeset -a rvm_rvmrc_files ++ (( 0 == 1 )) ++ [[ -n 0002 ]] ++ rvm_rvmrc_files=("/etc/rvmrc" "$HOME/.rvmrc") ++ [[ -n /home/ ]] ++ [[ /home//.rvmrc -ef /home//.rvmrc ]] ++ rvm_rvmrc_files+=("${rvm_prefix}/.rvmrc") ++ for _file in '"${rvm_rvmrc_files[@]}"' ++ [[ -s /etc/rvmrc ]] ++ for _file in '"${rvm_rvmrc_files[@]}"' ++ [[ -s /home//.rvmrc ]] ++ for _file in '"${rvm_rvmrc_files[@]}"' ++ [[ -s /home//.rvmrc ]] ++ return 0 ++ [[ 0 -eq 1 ]] ++ unset rvm_gemset_name ++ unset rvm_configure_flags rvm_patch_names rvm_make_flags ++ unset rvm_env_string rvm_ruby_string rvm_action rvm_error_message rvm_force_flag rvm_debug_flag rvm_delete_flag rvm_summary_flag rvm_json_flag rvm_yaml_flag rvm_file_name rvm_user_flag rvm_system_flag rvm_install_flag rvm_llvm_flag rvm_sticky_flag rvm_rvmrc_flag rvm_gems_flag rvm_docs_flag rvm_ruby_alias rvm_static_flag rvm_archive_extension rvm_hook rvm_ruby_name rvm_remote_flag ++ __rvm_load_rvmrc ++ typeset _file ++ typeset -a rvm_rvmrc_files ++ (( 0 == 1 )) ++ [[ -n 0002 ]] ++ rvm_rvmrc_files=("/etc/rvmrc" "$HOME/.rvmrc") ++ [[ -n /home/ ]] ++ [[ /home//.rvmrc -ef /home//.rvmrc ]] ++ rvm_rvmrc_files+=("${rvm_prefix}/.rvmrc") ++ for _file in '"${rvm_rvmrc_files[@]}"' ++ [[ -s /etc/rvmrc ]] ++ for _file in '"${rvm_rvmrc_files[@]}"' ++ [[ -s /home//.rvmrc ]] ++ for _file in '"${rvm_rvmrc_files[@]}"' ++ [[ -s /home//.rvmrc ]] ++ return 0 ++ (( 0 == 0 )) ++ [[ -n 0002 ]] ++ rvm_rvmrc_files=("/etc/rvmrc" "$HOME/.rvmrc") ++ [[ -n /home/ ]] ++ [[ /home//.rvmrc -ef /home//.rvmrc ]] ++ rvm_rvmrc_files+=("${rvm_prefix}/.rvmrc") ++ for rvmrc in '"${rvm_rvmrc_files[@]}"' ++ [[ -f /etc/rvmrc ]] ++ for rvmrc in '"${rvm_rvmrc_files[@]}"' ++ [[ -f /home//.rvmrc ]] ++ for rvmrc in '"${rvm_rvmrc_files[@]}"' ++ [[ -f /home//.rvmrc ]] ++ unset rvm_rvmrc_files ++ export rvm_path ++ [[ -z /home//.rvm ]] ++ true /home//.rvm/scripts ++ [[ -n 1 ]] ++ export rvm_user_install_flag ++ : rvm_bin_path:/home//.rvm/bin rvm_man_path:/home//.rvm/share/man rvm_archives_path:/home//.rvm/archives rvm_docs_path:/home//.rvm/docs rvm_environments_path:/home//.rvm/environments rvm_examples_path:/home//.rvm/examples rvm_gems_path:/home//.rvm/gems rvm_gemsets_path:/home//.rvm/gemsets rvm_help_path:/home//.rvm/help rvm_docs_path:/home//.rvm/docs rvm_hooks_path:/home//.rvm/hooks rvm_lib_path:/home//.rvm/lib rvm_log_path:/home//.rvm/log rvm_patches_path:/home//.rvm/patches rvm_repos_path:/home//.rvm/repos rvm_rubies_path:/home//.rvm/rubies rvm_rubygems_path:/home//.rvm/rubygems rvm_src_path:/home//.rvm/src rvm_tmp_path:/home//.rvm/tmp rvm_user_path:/home//.rvm/user rvm_usr_path:/home//.rvm/usr rvm_wrappers_path:/home//.rvm/wrappers rvm_verbose_flag:0 rvm_debug_flag:0 rvm_gems_cache_path:/home//.rvm/gems/cache ++ export rvm_action rvm_alias_expanded rvm_archive_extension rvm_archives_path rvm_bin_flag rvm_bin_path rvm_debug_flag rvm_default_flag rvm_delete_flag rvm_docs_path rvm_docs_type rvm_dump_environment_flag rvm_environments_path rvm_error_message rvm_examples_path rvm_expanding_aliases rvm_file_name rvm_gemdir_flag rvm_gems_cache_path rvm_gems_path rvm_gemset_name rvm_gemset_separator rvm_gemsets_path rvm_gemstone_package_file rvm_gemstone_url rvm_head_flag rvm_help_path rvm_docs_path rvm_hook rvm_hooks_path rvm_install_on_use_flag rvm_lib_path rvm_llvm_flag rvm_loaded_flag rvm_log_path rvm_niceness rvm_nightly_flag rvm_only_path_flag rvm_parse_break rvm_patch_original_pwd rvm_patches_path rvm_path rvm_pretty_print_flag rvm_proxy rvm_quiet_flag rvm_reload_flag rvm_remove_flag rvm_repos_path rvm_rubies_path rvm_ruby_alias rvm_ruby_args rvm_ruby_binary rvm_ruby_bits rvm_ruby_configure rvm_ruby_file rvm_ruby_gem_home rvm_ruby_gem_path rvm_ruby_global_gems_path rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_major_version rvm_ruby_make rvm_ruby_make_install rvm_ruby_minor_version rvm_ruby_mode rvm_ruby_name rvm_ruby_package_file rvm_ruby_package_name rvm_ruby_patch rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_revision rvm_ruby_selected_flag rvm_ruby_sha rvm_ruby_string rvm_ruby_strings rvm_ruby_tag rvm_ruby_url rvm_ruby_user_tag rvm_ruby_version rvm_script_name rvm_scripts_path rvm_sdk rvm_user_install_flag rvm_silent_flag rvm_src_path rvm_sticky_flag rvm_system_flag rvm_tmp_path rvm_token rvm_trace_flag rvm_use_flag rvm_user_flag rvm_user_path rvm_usr_path rvm_verbose_flag rvm_wrapper_name rvm_wrappers_path rvm_ruby_repo_branch rvm_man_path rvm_remote_flag
  • __rvm_setup
  • __variables_definition export
  • typeset -a __variables_list __array_list
  • typeset __method
  • __method=export
  • variables_list=(rvm_head_flag rvm_ruby_selected_flag rvm_user_install_flag rvm_path_flag rvm_cron_flag rvm_static_flag rvm_default_flag rvm_loaded_flag rvm_llvm_flag rvm_skip_autoreconf_flag rvm_dynamic_extensions_flag rvm_18_flag rvm_19_flag rvm_20_flag rvm_21_flag rvm_force_autoconf_flag rvm_dump_environment_flag rvm_curl_flags rvm_rubygems_version rvm_verbose_flag rvm_debug_flag rvm_trace_flag __array_start rvm_skip_pristine_flag rvm_create_flag rvm_remove_flag rvm_movable_flag rvm_archive_flag rvm_gemdir_flag rvm_reload_flag rvm_auto_reload_flag rvm_disable_binary_flag rvm_ignore_gemsets_flag rvm_skip_gemsets_flag rvm_install_on_use_flag rvm_remote_flag rvm_verify_downloads_flag rvm_skip_openssl_flag rvm_gems_cache_path rvm_gems_path rvm_man_path rvm_ruby_gem_path rvm_ruby_log_path rvm_gems_cache_path rvm_archives_path rvm_docs_path rvm_environments_path rvm_examples_path rvm_gems_path rvm_gemsets_path rvm_help_path rvm_hooks_path rvm_lib_path rvm_log_path rvm_patches_path rvm_repos_path rvm_rubies_path rvm_scripts_path rvm_src_path rvm_tmp_path rvm_user_path rvm_usr_path rvm_wrappers_path rvm_stored_errexit rvm_ruby_strings rvm_ruby_binary rvm_ruby_gem_home rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_major_version rvm_ruby_minor_version rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_repo_branch rvm_ruby_revision rvm_ruby_tag rvm_ruby_sha rvm_ruby_version rvm_ruby_package_file rvm_ruby_name rvm_ruby_name rvm_ruby_args rvm_ruby_user_tag rvm_ruby_patch detected_rvm_ruby_name rvm_env_loaded next_token rvm_error_message rvm_gemset_name rvm_parse_break rvm_token rvm_action rvm_export_args rvm_gemset_separator rvm_expanding_aliases rvm_tar_command rvm_tar_options rvm_patch_original_pwd rvm_project_rvmrc rvm_archive_extension rvm_autoinstall_bundler_flag rvm_codesign_identity rvm_expected_gemset_name rvm_without_gems rvm_with_gems rvm_with_default_gems rvm_ignore_dotfiles_flag rvm_fuzzy_flag rvm_autolibs_flag rvm_autolibs_flag_number rvm_autolibs_flag_runner rvm_quiet_curl_flag rvm_max_time_flag rvm_error_clr rvm_warn_clr rvm_debug_clr rvm_notify_clr rvm_reset_clr rvm_error_color rvm_warn_color rvm_debug_color rvm_notify_color rvm_reset_color rvm_log_timestamp rvm_log_filesystem rvm_log_namelen rvm_show_log_lines_on_error)
  • __array_list=(rvm_patch_names rvm_ree_options rvm_autoconf_flags rvm_architectures)
  • case "${__method}" in
  • true
  • export rvm_head_flag rvm_ruby_selected_flag rvm_user_install_flag rvm_path_flag rvm_cron_flag rvm_static_flag rvm_default_flag rvm_loaded_flag rvm_llvm_flag rvm_skip_autoreconf_flag rvm_dynamic_extensions_flag rvm_18_flag rvm_19_flag rvm_20_flag rvm_21_flag rvm_force_autoconf_flag rvm_dump_environment_flag rvm_curl_flags rvm_rubygems_version rvm_verbose_flag rvm_debug_flag rvm_trace_flag __array_start rvm_skip_pristine_flag rvm_create_flag rvm_remove_flag rvm_movable_flag rvm_archive_flag rvm_gemdir_flag rvm_reload_flag rvm_auto_reload_flag rvm_disable_binary_flag rvm_ignore_gemsets_flag rvm_skip_gemsets_flag rvm_install_on_use_flag rvm_remote_flag rvm_verify_downloads_flag rvm_skip_openssl_flag rvm_gems_cache_path rvm_gems_path rvm_man_path rvm_ruby_gem_path rvm_ruby_log_path rvm_gems_cache_path rvm_archives_path rvm_docs_path rvm_environments_path rvm_examples_path rvm_gems_path rvm_gemsets_path rvm_help_path rvm_hooks_path rvm_lib_path rvm_log_path rvm_patches_path rvm_repos_path rvm_rubies_path rvm_scripts_path rvm_src_path rvm_tmp_path rvm_user_path rvm_usr_path rvm_wrappers_path rvm_stored_errexit rvm_ruby_strings rvm_ruby_binary rvm_ruby_gem_home rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_major_version rvm_ruby_minor_version rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_repo_branch rvm_ruby_revision rvm_ruby_tag rvm_ruby_sha rvm_ruby_version rvm_ruby_package_file rvm_ruby_name rvm_ruby_name rvm_ruby_args rvm_ruby_user_tag rvm_ruby_patch detected_rvm_ruby_name __rvm_env_loaded next_token rvm_error_message rvm_gemset_name rvm_parse_break rvm_token rvm_action rvm_export_args rvm_gemset_separator rvm_expanding_aliases rvm_tar_command rvm_tar_options rvm_patch_original_pwd rvm_project_rvmrc rvm_archive_extension rvm_autoinstall_bundler_flag rvm_codesign_identity rvm_expected_gemset_name rvm_without_gems rvm_with_gems rvm_with_default_gems rvm_ignore_dotfiles_flag rvm_fuzzy_flag rvm_autolibs_flag rvm_autolibs_flag_number rvm_autolibs_flag_runner rvm_quiet_curl_flag rvm_max_time_flag rvm_error_clr rvm_warn_clr rvm_debug_clr rvm_notify_clr rvm_reset_clr rvm_error_color rvm_warn_color rvm_debug_color rvm_notify_color rvm_reset_color rvm_log_timestamp rvm_log_filesystem rvm_log_namelen rvm_show_log_lines_on_error
  • [[ -n 4.3.48(1)-release ]]
  • export -fn rvm_select_version_variables rvm_ruby_stringparse rvm_rm_rf_verbose rvm_parse_args
  • (( __rvm_env_loaded != 1 ))
  • [[ -n 4.3.48(1)-release ]]
  • __function_on_stack cd pushd popd
  • rvm_string_includes 'function_on_stack rvm_setup rvm_do_with_env_before rvm_cd_functions_set zsh_like_cd cd' cd pushd popd
  • typeset search 'text=function_on_stack rvm_setup rvm_do_with_env_before rvm_cd_functions_set __zsh_like_cd cd'
  • shift
  • for __search in '"$@"'
  • [[ function_on_stack rvm_setup rvm_do_with_env_before rvm_cd_functions_set __zsh_like_cd cd == \ \c\d\ ]]
  • return 0
  • [[ -n '' ]]
  • [[ -n '' ]]
  • __rvm_project_rvmrc
  • export __rvm_project_rvmrc_lock
  • : __rvm_project_rvmrc_lock:0
  • : __rvm_project_rvmrc_lock:1
  • (( __rvm_project_rvmrc_lock > 1 ))
  • typeset working_dir found_file rvm_trustworthiness_result save_PATH
  • working_dir=/home//.cache/sshcode
  • save_PATH=/home/user>/.rvm/gems/ruby-2.4.1/bin:/home/<user>/.rvm/gems/ruby-2.4.1@global/bin:/home/<user/.rvm/rubies/ruby-2.4.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home//.rvm/bin
  • :
  • [[ -z /home//.cache/sshcode ]]
  • [[ /home/ == \/\h\o\m\e\/\t\h\i\n\g\1\/.\c\a\c\h\e\/\s\s\h\c\o\d\e ]]
  • [[ /home/ == \/\h\o\m\e\/\t\h\i\n\g\1\/.\c\a\c\h\e\/\s\s\h\c\o\d\e ]]
  • [[ /home//.cache/sshcode == . ]]
  • __rvm_project_dir_check /home//.cache/sshcode found_file
  • typeset _found_file path_to_check variable variable_default
  • typeset -a _valid_files
  • path_to_check=/home//.cache/sshcode
  • variable=found_file
  • variable_default=
  • _valid_files=("$path_to_check" "$path_to_check/.rvmrc" "$path_to_check/.versions.conf" "$path_to_check/.ruby-version" "$path_to_check/.rbfu-version" "$path_to_check/.rbenv-version" "$path_to_check/Gemfile")
  • __rvm_find_first_file _found_file /home//.cache/sshcode /home//.cache/sshcode/.rvmrc /home//.cache/sshcode/.versions.conf /home//.cache/sshcode/.ruby-version /home//.cache/sshcode/.rbfu-version /home//.cache/sshcode/.rbenv-version /home//.cache/sshcode/Gemfile
  • typeset _first_file _variable_first_file __file_enum
  • _first_file=
  • _variable_first_file=_found_file
  • shift
  • for __file_enum in '"$@"'
  • [[ -f /home//.cache/sshcode ]]
  • for __file_enum in '"$@"'
  • [[ -f /home//.cache/sshcode/.rvmrc ]]
  • for __file_enum in '"$@"'
  • [[ -f /home//.cache/sshcode/.versions.conf ]]
  • for __file_enum in '"$@"'
  • [[ -f /home//.cache/sshcode/.ruby-version ]]
  • for __file_enum in '"$@"'
  • [[ -f /home//.cache/sshcode/.rbfu-version ]]
  • for __file_enum in '"$@"'
  • [[ -f /home//.cache/sshcode/.rbenv-version ]]
  • for __file_enum in '"$@"'
  • [[ -f /home//.cache/sshcode/Gemfile ]]
  • eval '_found_file=""' ++ _found_file=
  • return 1
  • true
  • [[ '' == \G\e\m\f\i\l\e ]]
  • [[ '' == \/\h\o\m\e\/\t\h\i\n\g\1\/.\r\v\m\r\c ]]
  • [[ -n found_file ]]
  • eval 'found_file="${_found_file:-}"' ++ found_file=
  • [[ -n '' ]]
  • typeset __result=1
  • unset RVM_PROJECT_PATH
  • return 1
  • working_dir=/home//.cache
  • :
  • [[ -z /home//.cache ]]
  • [[ /home/ == \/\h\o\m\e\/\t\h\i\n\g\1\/.\c\a\c\h\e ]]
  • [[ /home/ == \/\h\o\m\e\/\t\h\i\n\g\1\/.\c\a\c\h\e ]]
  • [[ /home//.cache == . ]]
  • __rvm_project_dir_check /home//.cache found_file
  • typeset _found_file path_to_check variable variable_default
  • typeset -a _valid_files
  • path_to_check=/home//.cache
  • variable=found_file
  • variable_default=
  • _valid_files=("$path_to_check" "$path_to_check/.rvmrc" "$path_to_check/.versions.conf" "$path_to_check/.ruby-version" "$path_to_check/.rbfu-version" "$path_to_check/.rbenv-version" "$path_to_check/Gemfile")
  • __rvm_find_first_file _found_file /home//.cache /home//.cache/.rvmrc /home//.cache/.versions.conf /home//.cache/.ruby-version /home//.cache/.rbfu-version /home//.cache/.rbenv-version /home//.cache/Gemfile
  • typeset _first_file _variable_first_file __file_enum
  • _first_file=
  • _variable_first_file=_found_file
  • shift
  • for __file_enum in '"$@"'
  • [[ -f /home//.cache ]]
  • for __file_enum in '"$@"'
  • [[ -f /home//.cache/.rvmrc ]]
  • for __file_enum in '"$@"'
  • [[ -f /home//.cache/.versions.conf ]]
  • for __file_enum in '"$@"'
  • [[ -f /home//.cache/.ruby-version ]]
  • for __file_enum in '"$@"'
  • [[ -f /home//.cache/.rbfu-version ]]
  • for __file_enum in '"$@"'
  • [[ -f /home//.cache/.rbenv-version ]]
  • for __file_enum in '"$@"'
  • [[ -f /home//.cache/Gemfile ]]
  • eval '_found_file=""' ++ _found_file=
  • return 1
  • true
  • [[ '' == \G\e\m\f\i\l\e ]]
  • [[ '' == \/\h\o\m\e\/\t\h\i\n\g\1\/.\r\v\m\r\c ]]
  • [[ -n found_file ]]
  • eval 'found_file="${_found_file:-}"' ++ found_file=
  • [[ -n '' ]]
  • typeset __result=1
  • unset RVM_PROJECT_PATH
  • return 1
  • working_dir=/home/
  • :
  • [[ -z /home/ ]]
  • [[ /home/ == \/\h\o\m\e\/\t\h\i\n\g\1 ]]
  • (( 0 >= 1 ))
  • [[ -n '' ]]
  • __rvm_file_env_check_unload
  • (( 0 > 0 ))
  • rvm_saved_env=()
  • unset rvm_current_rvmrc rvm_previous_environment
  • break
  • unset __rvm_project_rvmrc_lock
  • return 1
  • true
  • __rvm_after_cd
  • typeset rvm_hook
  • rvm_hook=after_cd
  • [[ -n /home//.rvm/scripts ]]
  • source /home//.rvm/scripts/hook ++ typeset old_rvm_verbose_flag old_rvm_debug_flag ++ old_rvm_verbose_flag=0 ++ old_rvm_debug_flag=0 ++ typeset rvm_verbose_flag rvm_debug_flag hooks ++ true rvm_verbose_flag:0 rvm_hooks_path:/home//.rvm/hooks rvm_debug_flag:0 rvm_hook:after_cd ++ [[ -n after_cd ]] ++ hooks=() ++ [[ -d /home//.rvm/hooks ]] ++ hooks+=("$rvm_hooks_path") ++ [[ /home//.cache/sshcode/.rvm/hooks != \/\h\o\m\e\/\t\h\i\n\g\1\/.\r\v\m\/\h\o\o\k\s ]] ++ [[ -d /home//.cache/sshcode/.rvm/hooks ]] ++ [[ -n /home//.rvm/hooks ]] ++ rvm_read_lines _hooks_list /dev/fd/63 ++ typeset IFS ++ IFS=' ' ++ [[ /dev/fd/63 == - ]] ++ eval '_hooks_list=( $( \command \cat "${2:--}" ) )' +++ _hooks_list=($( \command \cat "${2:--}" )) +++ rvm_find -L /home//.rvm/hooks -iname 'after_cd*' -type f ++++ command cat /dev/fd/63 ++++ cat /dev/fd/63 ++ for hook in '"${_hooks_list[@]}"' ++ [[ -x /home//.rvm/hooks/after_cd_bundler ]] ++ [[ after_cdbundler == \a\f\t\e\r\\c\d ]] ++ for hook in '"${_hooks_list[@]}"' ++ [[ -x /home//.rvm/hooks/after_cd_install_vendored_gems ]] ++ [[ after_cd_install_vendoredgems == \a\f\t\e\r\\c\d ]] ++ unset rvm_hook hooks _hooks_list hook
  • __rvm_do_with_env_after
  • __rvm_teardown
  • builtin command -v __rvm_cleanup_tmp
  • __rvm_cleanup_tmp
  • [[ -d /home//.rvm/tmp/ ]]
  • case "${rvm_tmp_path%\/}" in
  • __rvm_rm_rf '/home//.rvm/tmp/10256*'
  • __rvm_rm_rf_verbose '/home//.rvm/tmp/10256*'
  • typeset target
  • target='/home//.rvm/tmp/10256*'
  • [[ -n '' ]]
  • [[ -n 4.3.48(1)-release ]]
  • builtin shopt -s extglob
  • case "${target}" in
  • [[ -z /home//.rvm/tmp/10256* ]]
  • [[ -d /home//.rvm/tmp/10256* ]]
  • [[ -f /home//.rvm/tmp/10256* ]]
  • [[ -L /home//.rvm/tmp/10256* ]]
  • rvm_debug '__rvm_rm_rf already gone: /home//.rvm/tmp/10256*'
  • (( 0 ))
  • return 0
  • true
  • true
  • export __rvm_env_loaded
  • : __rvm_env_loaded:1:
  • : __rvm_env_loaded:1:
  • : __rvm_env_loaded:0:
  • [[ -z /home//.rvm/tmp ]]
  • (( __rvm_env_loaded > 0 ))
  • [[ -n 4.3.48(1)-release ]]
  • trap - EXIT HUP INT QUIT TERM
  • is_a_function shell_session_update
  • typeset -f shell_session_update
  • return 1
  • (( rvm_bash_nounset == 1 )) /home//.rvm/scripts/functions/environment: line 265: rvm_bash_nounset: unbound variable 2019-09-27 09:12:08 ERROR failed to send SIGTERM to SSH master process: os: process already finished 2019-09-27 09:12:08 FATAL error: failed to update code-server: ---ssh cmd--- ssh user>@<host '/usr/bin/env bash -l' ---download script--- set -euxo pipefail || exit 1

[ "$(uname -m)" != "x86_64" ] && echo "Unsupported server architecture $(uname -m). code-server only has releases for x86_64 systems." && exit 1 pkill -f ~/.cache/sshcode/sshcode-server || true mkdir -p ~/.local/share/code-server ~/.cache/sshcode cd ~/.cache/sshcode curlflags="-o latest-linux" if [ -f latest-linux ]; then curlflags="$curlflags -z latest-linux" fi curl $curlflags https://codesrv-ci.cdr.sh/latest-linux [ -f ~/.cache/sshcode/sshcode-server ] && rm ~/.cache/sshcode/sshcode-server ln latest-linux ~/.cache/sshcode/sshcode-server chmod +x ~/.cache/sshcode/sshcode-server: exit status 1

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cdr/sshcode/issues/139?email_source=notifications&email_token=ACVYSVHVVHM77Z423AUSB4DQLYBP7A5CNFSM4IVBKUCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7Y3KNI#issuecomment-535934261, or mute the thread https://github.com/notifications/unsubscribe-auth/ACVYSVAKRDYJLBOAMKRDW6LQLYBP7ANCNFSM4IVBKUCA .

foxsam21 commented 5 years ago

I didn't remove rvm but I commented out the bash version check of rvm script (~/.rvm/scripts/functions/environment) like this:

#  if
#    [[ -n "${BASH_VERSION:-}" ]] && ! __function_on_stack cd pushd popd
#  then
    export rvm_shell_nounset
    if __rvm_has_opt "nounset"
    then rvm_bash_nounset=1
    else rvm_bash_nounset=0
    fi
    set +o nounset

    trap '__rvm_teardown_final ; set +x' EXIT HUP INT QUIT TERM
#  fi

and it works now. So maybe its not a code-server issue.

edit: I also tried that file the way it was without commenting out and just removed it from .bash_profile and .bashrc and that also works.

nbhr commented 5 years ago

The following solved the problem on WSL for me. The point is to set PATH without spaces.

$ env PATH=/usr/bin:/bin ./sshcode your-ssh-target

Running sshcode without modifying PATH reports the following in my environment.

sh: 5: export: (x86)/Common: bad variable name

Merith-TK commented 5 years ago

In your rc file. do this

export OLDPATH=$PATH

And then modify the path variable below that, so that it is a proper unix path

On Sat, Oct 19, 2019, 9:54 PM nbhr notifications@github.com wrote:

The following solved the problem on WSL for me. The point is to set PATH without spaces.

$ env PATH=/usr/bin:/bin ./sshcode your-ssh-target

Running sshcode without modifying PATH reports the following in my environment.

sh: 5: export: (x86)/Common: bad variable name

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cdr/sshcode/issues/139?email_source=notifications&email_token=ACPQOXTJLG34G6VMB52GU7TQPPQBRA5CNFSM4IVBKUCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBYCMCI#issuecomment-544220681, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPQOXWJ4QZA52DRURM3V3LQPPQBRANCNFSM4IVBKUCA .

aravindharinair commented 4 years ago

Hey, I know this is an old issue, but decided to add on to this since it was still open and there wasn't a solution. Was setting up code-server on WSL and ran into this:

2020-03-18 18:59:42 INFO        starting SSH master connection...
2020-03-18 18:59:45 ERROR       failed to start SSH master connection: SSH master wasn't ready on time: SSH master process is not running
2020-03-18 18:59:45 INFO        ensuring code-server is updated...
kyle@dev.kwc.io: Permission denied (publickey).
2020-03-18 18:59:47 FATAL       error: failed to update code-server:
---ssh cmd---
ssh  kyle@dev.kwc.io '/usr/bin/env bash -l'
---download script---
set -euxo pipefail || exit 1

[ "$(uname -m)" != "x86_64" ] && echo "Unsupported server architecture $(uname -m). code-server only has releases for x86_64 systems." && exit 1
pkill -f ~/.cache/sshcode/sshcode-server || true
mkdir -p ~/.local/share/code-server ~/.cache/sshcode
cd ~/.cache/sshcode
curlflags="-o latest-linux"
if [ -f latest-linux ]; then
        curlflags="$curlflags -z latest-linux"
fi
curl $curlflags https://codesrv-ci.cdr.sh/latest-linux
[ -f ~/.cache/sshcode/sshcode-server ] && rm ~/.cache/sshcode/sshcode-server
ln latest-linux ~/.cache/sshcode/sshcode-server
chmod +x ~/.cache/sshcode/sshcode-server: exit status 255
deansheather commented 4 years ago

sshcode kyle@dev.kwc.io is just an example for the README. Instead, you should run sshcode username@your-server-ip.

On Wed, Mar 18, 2020 at 11:37 PM Aravind Hari Nair notifications@github.com wrote:

Hey, I know this is an old issue, but decided to add on to this since it was still open and there wasn't a solution. Was setting up code-server on WSL and ran into this:

2020-03-18 18:59:42 INFO starting SSH master connection... 2020-03-18 18:59:45 ERROR failed to start SSH master connection: SSH master wasn't ready on time: SSH master process is not running 2020-03-18 18:59:45 INFO ensuring code-server is updated...kyle@dev.kwc.io: Permission denied (publickey). 2020-03-18 18:59:47 FATAL error: failed to update code-server: ---ssh cmd--- ssh kyle@dev.kwc.io '/usr/bin/env bash -l' ---download script--- set -euxo pipefail || exit 1

[ "$(uname -m)" != "x86_64" ] && echo "Unsupported server architecture $(uname -m). code-server only has releases for x86_64 systems." && exit 1 pkill -f ~/.cache/sshcode/sshcode-server || true mkdir -p ~/.local/share/code-server ~/.cache/sshcode cd ~/.cache/sshcode curlflags="-o latest-linux" if [ -f latest-linux ]; then curlflags="$curlflags -z latest-linux" fi curl $curlflags https://codesrv-ci.cdr.sh/latest-linux [ -f ~/.cache/sshcode/sshcode-server ] && rm ~/.cache/sshcode/sshcode-server ln latest-linux ~/.cache/sshcode/sshcode-server chmod +x ~/.cache/sshcode/sshcode-server: exit status 255

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cdr/sshcode/issues/139#issuecomment-600626892, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVYSVGQJJH2OBA77GWWF4TRIDFCTANCNFSM4IVBKUCA .

aravindharinair commented 4 years ago

sshcode kyle@dev.kwc.io is just an example for the README. Instead, you should run sshcode username@your-server-ip. On Wed, Mar 18, 2020 at 11:37 PM Aravind Hari Nair @.> wrote: Hey, I know this is an old issue, but decided to add on to this since it was still open and there wasn't a solution. Was setting up code-server on WSL and ran into this: 2020-03-18 18:59:42 INFO starting SSH master connection... 2020-03-18 18:59:45 ERROR failed to start SSH master connection: SSH master wasn't ready on time: SSH master process is not running 2020-03-18 18:59:45 INFO ensuring code-server is @.: Permission denied (publickey). 2020-03-18 18:59:47 FATAL error: failed to update code-server: ---ssh cmd--- ssh @.*** '/usr/bin/env bash -l' ---download script--- set -euxo pipefail || exit 1 [ "$(uname -m)" != "x86_64" ] && echo "Unsupported server architecture $(uname -m). code-server only has releases for x86_64 systems." && exit 1 pkill -f ~/.cache/sshcode/sshcode-server || true mkdir -p ~/.local/share/code-server ~/.cache/sshcode cd ~/.cache/sshcode curlflags="-o latest-linux" if [ -f latest-linux ]; then curlflags="$curlflags -z latest-linux" fi curl $curlflags https://codesrv-ci.cdr.sh/latest-linux [ -f ~/.cache/sshcode/sshcode-server ] && rm ~/.cache/sshcode/sshcode-server ln latest-linux ~/.cache/sshcode/sshcode-server chmod +x ~/.cache/sshcode/sshcode-server: exit status 255 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#139 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVYSVGQJJH2OBA77GWWF4TRIDFCTANCNFSM4IVBKUCA .

Oh. My bad. Any server works? Or are there any recommended ones? My objective is to set up my current system as the server and remotely log in to that from another device, say an iPad for editing while I'm not at my desk.

Merith-TK commented 4 years ago

Linux Servers running on a amd64 processor are 100% supported, just make sure you can ssh into it and you should have no problem.

deansheather commented 4 years ago

sshcode doesn't run on an iPad. You should just run code-server directly on your computer.

On Thu, Mar 19, 2020 at 2:02 AM Merith notifications@github.com wrote:

Linux Servers running on a amd64 processor are 100% supported, just make sure you can ssh into it and you should have no problem.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cdr/sshcode/issues/139#issuecomment-600716657, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVYSVCVR226HP66EILLRVTRIDV77ANCNFSM4IVBKUCA .

aravindharinair commented 4 years ago

Apologies. Looks like a mistake on my end. I missed the part where it was mentioned you had to run sshcode on your system to connect to the remote. I was trying to run in on WSL thinking that's the server.

So, am I right in assuming this won't work in WSL or VM? I can't install Ubuntu on work laptop. Max is VM.

deansheather commented 4 years ago

I'm unsure if sshcode will work with WSL but you can give it a try. You'll need to start an openssh server in WSL and connect to that.

Merith-TK commented 4 years ago

WSL SHOULD work, i think we had a PR to make it work a while ago

aravindharinair commented 4 years ago

Code-server is working on WSL. Doesn't mention WSL on the list of supported hosts yet. Can access via localhost. Need to try access through local network now. Tried direct install. Not via sshcode. Will try that too and let you know.