Giter Site home page Giter Site logo

Comments (17)

yosefyehoshua avatar yosefyehoshua commented on May 24, 2024 1

ok I'll give it a try and see its solves it, I appreciate your help!

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on May 24, 2024

Hi, thanks for reporting in. As a first step, please upgrade to the latest version (Steps in README). The tag is set to v0.0.1 which was the very first release. Since then several releases with improvements have been published.

It would also be hard for me to provide support on it since the codebase has changed significantly since then going under a major rewrite. If you still face an issue, just post the output of :RemoteInfo's failing action and any failures logged in :RemoteLog.

from remote-nvim.nvim.

yosefyehoshua avatar yosefyehoshua commented on May 24, 2024

oh yeah foolish mistake, I can connect now thank! but I think that because my config is .remote-nvim/workspaces/HUza2WYq5Q/.config/LazyVim instead of .remote-nvim/workspaces/HUza2WYq5Q/.config/nvim it pops a clean nvim window and doesn't load the LazyVim config. Is there any way to set it so it will copy the LazyVim dir name as nvim?

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on May 24, 2024

Yes, you can.

{
   "amitds1997/remote-nvim.nvim",
   version = "*", -- Pin to GitHub releases
   dependencies = {
       "nvim-lua/plenary.nvim", -- For standard functions
       "MunifTanjim/nui.nvim", -- To build the plugin UI
       "nvim-telescope/telescope.nvim", -- For picking b/w different remote methods
   },
   config = {
     remote = {
       copy_dirs = {
         config = {
           base = vim.fn.stdpath("config"), -- Just update this base value to whatever path your configuration should be copied over from
         }
       }
     }
   }
}

What this would do is copy the local dir specified as base to .config/nvim. If this would not work for your use case for some reason, let me know. I have not worked with LazyVim so I am a bit ignorant about how your workflow currently loads its configuration.

You can read more about what all can be configured under Advanced Configuration in https://github.com/amitds1997/remote-nvim.nvim?tab=readme-ov-file#-installation

from remote-nvim.nvim.

yosefyehoshua avatar yosefyehoshua commented on May 24, 2024

Thanks, acually now i get the following error even when i use the default config (connection to my host from terminal is fine):

`ERROR Sun Mar 3 18:13:42 2024 .local/share/LazyVim/lazy/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:876: 'Testing remote connection' failed.
stack traceback:
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:877: in function '_handle_job_completion'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:918: in function 'run_command'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:131: in function '_setup_workspace_variables'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:774: in function '_launch_neovim'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:789: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:788>
[C]: in function 'xpcall'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:669: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:668>

FAILED JOB OUTPUT (SO FAR)
ssh: Could not resolve hostname :22: nodename nor servname provided, or not known`

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on May 24, 2024

Somehow the hostname was not passed down to the SSH command. This should not happen.

Could you share

  1. What method are you using to connect to the remote? Is it a host in your SSH Config file or is it a password based authentication. If password based authentication, what is the command that you use. Replace sensitive parts as needed.
  2. Your current plugin configuration

This would help me replicate things at my end and figure out the resolution.

from remote-nvim.nvim.

yosefyehoshua avatar yosefyehoshua commented on May 24, 2024
  1. I'm using :RemoteStart <User name>@<host addr>:22 password based

return {
  "amitds1997/remote-nvim.nvim",
  version = "*", -- Pin to GitHub releases
  dependencies = {
    "nvim-lua/plenary.nvim", -- For standard functions
    "MunifTanjim/nui.nvim", -- To build the plugin UI
    "nvim-telescope/telescope.nvim", -- For picking b/w different remote methods
  },
  config = true,
}

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on May 24, 2024

Config seems alright.

  1. I'm using :RemoteStart <User name>@<host addr>:22 password based
  1. Could you try running just :RemoteStart and re-connecting using the manual input method?
  2. Was this saved configuration created from the previous release by any chance, before you upgraded to the latest release? I ask this because there are checks in place in the later releases to ensure that the hostname is never empty (here) but somehow this configuration is empty.
  3. Could you share the output of ~/.local/share/nvim/remote-nvim.nvim/workspace.json. If you have done some configuratin at your end to move things around, it would be at the path which would be the output of :lua= vim.fn.stdpath("data").."/remote-nvim.nvim/workspace.json". This would give a complete picture of what configuration has been stored for <user name>@<host>:22 by the plugin.

from remote-nvim.nvim.

yosefyehoshua avatar yosefyehoshua commented on May 24, 2024
  1. Did that it gave me the same error:
 Launch Neovim (Run no. 1) (no longer active)
   Testing remote connection
    Command: echo 'Hello'

    ssh: Could not resolve hostname <host addr>:22: nodename nor servname provided, or not known
  1. I dont think so, becasue the connection was successful only after I updated the config as you told me. But after I tried to change the config as such, trouble started

Yes, you can.

{
   "amitds1997/remote-nvim.nvim",
   version = "*", -- Pin to GitHub releases
   dependencies = {
       "nvim-lua/plenary.nvim", -- For standard functions
       "MunifTanjim/nui.nvim", -- To build the plugin UI
       "nvim-telescope/telescope.nvim", -- For picking b/w different remote methods
   },
   config = {
     remote = {
       copy_dirs = {
         config = {
           base = vim.fn.stdpath("config"), -- Just update this base value to whatever path your configuration should be copied over from
         }
       }
     }
   }
}

What this would do is copy the local dir specified as base to .config/nvim. If this would not work for your use case for some reason, let me know. I have not worked with LazyVim so I am a bit ignorant about how your workflow currently loads its configuration.

You can read more about what all can be configured under Advanced Configuration in https://github.com/amitds1997/remote-nvim.nvim?tab=readme-ov-file#-installation

  1. ~/.local/share/LazyVim/remote-nvim.nvim/workspace.json is an empty array: []

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on May 24, 2024

Hmm, so it is picking up the host name. Are you able to connect to the remote host from your terminal using ssh <user-name>@<host>? Because underneath the plugin, it calls the SSH command. The output seems eerily similar to what you would get if your machine is not able to connect to the remote host.

image

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on May 24, 2024

Ah wait, I think I got it. I think you are providing the ssh input as ssh <username>@<host>:22 which is incorrect syntax. If you want to specify a port, you have to use -p for it so it would be ssh <username>@<host> -p 22 (but I would just chuck port 22 altogether since it's anyway the default port).

from remote-nvim.nvim.

yosefyehoshua avatar yosefyehoshua commented on May 24, 2024

yes I can :

<user>@mac-2 ~ % ssh <user name>@<host addr> -p 22 "echo hello"
hello

even for RemoteStart <User name>@<host addr> without the default port it gives the same error. I really wonder what suddenly happened

from remote-nvim.nvim.

yosefyehoshua avatar yosefyehoshua commented on May 24, 2024

If I'm trying to connect via ssh/.config file of the same host I get:


  Launch Neovim (Run no. 1) (no longer active)
   Testing remote connection
   Determining OS on remote machine
   Choice: Choose remote OS (found OS 'Bytes per second: sent 21449.3, received 20289.9'): 
   Choice: Which Neovim version should be installed on remote?
   Determining remote user's home directory
   Creating custom neovim directories on remote
   Copying plugin scripts onto remote
    Command: COPY ~/.local/share/LazyVim/lazy/remote-nvim.nvim/scripts -> Bytes per second: sent 22679.7, received 21456.8/.remote-nvim
21456.8/.remote-nvim: No such file or directory

the ssh/.config :

HostName: <host addr>
LogLevel: verbose
Port: 22
User: <user>

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on May 24, 2024

If I'm trying to connect via ssh/.config file of the same host I get:


  Launch Neovim (Run no. 1) (no longer active)
   Testing remote connection
   Determining OS on remote machine
   Choice: Choose remote OS (found OS 'Bytes per second: sent 21449.3, received 20289.9'): 
   Choice: Which Neovim version should be installed on remote?
   Determining remote user's home directory
   Creating custom neovim directories on remote
   Copying plugin scripts onto remote
    Command: COPY ~/.local/share/LazyVim/lazy/remote-nvim.nvim/scripts -> Bytes per second: sent 22679.7, received 21456.8/.remote-nvim
21456.8/.remote-nvim: No such file or directory

the ssh/.config :

HostName: <host addr>
LogLevel: verbose
Port: 22
User: <user>

Could you try removing the LogLevel: verbose temporarily and re-try?

from remote-nvim.nvim.

yosefyehoshua avatar yosefyehoshua commented on May 24, 2024

I removed the verbose and got:

  Launch Neovim (Run no. 1) (no longer active)
   Testing remote connection
   Determining OS on remote machine
   Choice: Which Neovim version should be installed on remote?
   Determining remote user's home directory
   Creating custom neovim directories on remote
   Copying plugin scripts onto remote
   Installing Neovim (if required)
    Command: chmod +x /home/yyehoshua/.remote-nvim/scripts/neovim_download.sh && chmod +x ~/.remote-nvim/scripts/neovim_install.sh && ~/.remote-nvim/scripts/neovim_install.sh -v v0.9.5 -d ~/.remote-nvim

    Neovim installation is corrupted. Would re-install...
    Downloading Neovim...
    curl: (28) Failed to connect to github.com port 443: Connection timed out

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on May 24, 2024

Is your remote host perhaps in a region from where it is hard to connect to GitHub?

You should update your configuration to download Neovim locally and transfer it to the remote then:

config = {
 <your-original-config-values>,
  offline_mode = {
    enabled = true,
    no_github = false,
  },
}

Note that if you still face GitHub connection issues, you would have to go through this and set up your configuration accordingly. If there is any other issue, let me know.

I am still not sure though what was blocking your original manual input run though 🤔 since both manual input and ssh config based connections use the same backend.

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on May 24, 2024

Closing this. If you have any questions, feel free to drop one or reopen this one. Thanks!

from remote-nvim.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.