Skip to content

[Bug]: "devbox global push <gitrepo>" fails with "Error: not logged in" #1580

@dimas-cyriaco

Description

@dimas-cyriaco

Current Behavior (bug)
Running devbox global push <githubrepo> fails with the following error:

$ devbox global push git@github.com:dimas-cyriaco/devbox.git    
Error: not logged in

Error: runtime error: invalid memory address or nil pointer dereference

Expected Behavior (fix)
Expected to push the config to the repo.

Additional context

Version:

Version:     0.7.0
Platform:    darwin_arm64
Commit:      2d8c4ff11ca1063ef036040615ae89f6458f8d7c
Commit Time: 2023-10-12T15:17:51Z
Go Version:  go1.21.1
Launcher:    0.2.0

devbox.json:

{
  "packages": [
    "git@latest",
    "htop@latest",
    "gh@latest",
    "glab@latest",
    "fzf@latest",
    "ripgrep@latest",
    "vscode@latest",
    "jq@latest",
    "yq@latest",
    "neovim@latest",
    "neofetch@latest",
    "btop@latest",
    "cheat@latest",
    "bash-preexec@latest",
    "tree-sitter@latest",
    "nodejs@latest",
    "python3Full@latest",
    "eza@latest",
    "bat@latest",
    "atuin@latest",
    "zoxide@latest",
    "direnv@latest",
    "starship@latest",
    "alacritty@latest",
    "lazydocker@latest",
    "shellcheck@latest",
    "broot@latest"
  ],
  "env": {
    "DEVBOX_GLOBAL_PREFIX": "$HOME/.local/share/devbox/global/default/.devbox/nix/profile/default",
    "DEVBOX_GLOBAL_ROOT": "$HOME/.local/share/devbox/global/current"
  },
  "shell": {
    "init_hook": [
      ". ${DEVBOX_GLOBAL_ROOT}/init.sh"
    ],
    "scripts": {
      "install-astro": [
        "echo cloning astronvim repo to ~/.config/nvim",
        "git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/nvim"
      ],
      "install-hook-bash": [
        "echo adding 'devbox global shellenv' to ~/.bashrc",
        "grep -qF 'devbox global shellenv' ~/.bashrc || echo 'eval \"$(devbox global shellenv --init-hook)\"' >> ~/.bashrc",
        "tail -n 1 ~/.bashrc"
      ],
      "install-hook-zsh": [
        "echo adding 'devbox global shellenv' to ~/.zshrc",
        "grep -qF 'devbox global shellenv' ~/.zshrc || echo 'eval \"$(devbox global shellenv --init-hook)\"' >> ~/.zshrc",
        "tail -n 1 ~/.zshrc"
      ],
      "install-starship-prompt": [
        "if [ ! -f $HOME/.config/starship.toml ]",
        "then",
        "curl -fsSL https://devbox.getfleek.dev/config/starship/starship.toml > $HOME/.config/starship.toml",
        "fi"
      ],
      "latest-hash": [
        "curl -fsSL https://nixos.org/channels/nixos-unstable/git-revision"
      ],
      "npm-global": [
        "grep -qF '.npm-packages' ~/.npmrc || echo 'prefix=~/.npm-packages' >> ~/.npmrc",
        "grep -qF '.npm-packages' ~/.zshrc || echo 'export PATH=$PATH:~/.npm-packages/bin' >> ~/.zshrc",
        "grep -qF '.npm-packages' ~/.bashrc || echo 'export PATH=$PATH:~/.npm-packages/bin' >> ~/.bashrc",
        "mkdir -p ~/.npm-packages"
      ]
    }
  },
  "nixpkgs": {}
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Merged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions