Skip to content

Commit Failing : Server Address Not Found #476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thecontinium opened this issue Mar 16, 2023 · 2 comments
Closed

Commit Failing : Server Address Not Found #476

thecontinium opened this issue Mar 16, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@thecontinium
Copy link

Description

Committing files is failing with the Neogit console error:

> git --no-pager -c color.ui=always --no-optional-locks commit
hint: Waiting for your editor to close the file... Error detected while processing command line:
E5108: Error executing lua ...thew/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:43: NVIM server address not set
stack traceback:
        [C]: in function 'error'
        ...thew/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:43: in function 'client'
Command "git --no-pager -c color.ui=always --no-optional-locks commit" running for more than: 2.0 seconds

Neovim version

NVIM v0.9.0-dev-2445+g320cb344c-dirty
Build type: Release
LuaJIT 2.1.0-beta3

same error on latest release 0.8.3.

Operating system and version

macOS 13.2.1

Steps to reproduce

  1. nvim -nu /tmp/minimal.lua
  2. Neogit
  3. c
  4. c

Expected behavior

Files committed

Actual behavior

No files committed.

Neogit console:

> git --no-pager -c color.ui=always --no-optional-locks commit
hint: Waiting for your editor to close the file... Error detected while processing command line:
E5108: Error executing lua ...thew/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:43: NVIM server address not set
stack traceback:
        [C]: in function 'error'
        ...thew/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:43: in function 'client'
Command "git --no-pager -c color.ui=always --no-optional-locks commit" running for more than: 2.0 seconds

Minimal config

vim.cmd([[set runtimepath=$VIMRUNTIME]])
vim.cmd([[set packpath=/tmp/nvim/site]])
local package_root = "/tmp/nvim/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
  require("packer").startup({
    {
      "wbthomason/packer.nvim",
      {
        "TimUntersberger/neogit",
        requires = {
          { "nvim-lua/plenary.nvim" },
          { "sindrets/diffview.nvim" },
        },
        config = function()
          print("loaded neogit")
          require("neogit").setup()
        end,
      },
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. "/plugin/packer_compiled.lua",
      display = { non_interactive = true },
    },
  })
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing neogit and dependencies.")
  vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path })
end
load_plugins()
require("packer").sync()
@thecontinium thecontinium added the bug Something isn't working label Mar 16, 2023
@Leo310
Copy link

Leo310 commented Jun 1, 2023

I am having the same problem on Nvim v0.9.1 Release build with this config using the lazy package manager:

return {
    "TimUntersberger/neogit",
    dependencies = {
        "nvim-lua/plenary.nvim",
    },
    config = function()
        vim.keymap.set("n", "<leader>gs", ":Neogit<CR>", { desc = "Opens neogit" })
        require("neogit").setup({
            integrations = {
                diffview = true,
            },
        })
    end,
}

@thecontinium
Copy link
Author

The problem for me was in my dot files and caused by setting XDG_RUNTIME_PATH

export XDG_RUNTIME_DIR=/tmp/run

without the directory /tmp/run existing.

mkdir -p "$XDG_RUNTIME_DIR"

fixes the issue

@CKolkey CKolkey closed this as completed Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants