The Wayback Machine - https://web.archive.org/web/20221220124108/https://github.com/github/hub/issues/2565
Skip to content
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

Snap Version Breaks Environment #2565

Closed
pckilgore opened this issue Jun 19, 2020 · 7 comments
Closed

Snap Version Breaks Environment #2565

pckilgore opened this issue Jun 19, 2020 · 7 comments
Labels

Comments

@pckilgore
Copy link

pckilgore commented Jun 19, 2020

Context
I use chezmoi (which call out to git under the hood) composed with keybase encrypted git repositories (which provides a git-remote helper). This combination has served me well, I recommend it!

But when I install hub via the snap package, these applications no longer compose neatly.

Command attempted:
git push

What happened:
git-remote-keybase does not think keybase is running, because XDG environment is missing. See this issue for the gritty details.

This happens only with hub provided as a snap. Installing via APT and there is no problem.

More info:

$ hub --version
git version 2.25.1
hub version 2.14.2
$ snap info hub
name:      hub
summary:   hub is a command-line wrapper for git that makes you better at GitHub.
publisher: Ricardo N Feliciano (felicianotech)
store-url: https://snapcraft.io/hub
contact:   https://Feliciano.Tech/contact
license:   unset
description: |
  [ SNIP ]
commands:
  - hub
snap-id:      oaQHXl9Nl2aedf7khkmFg2dyi299y9U0
tracking:     latest/stable
refresh-date: today at 06:31 CDT
channels:
  latest/stable:    v2.14.2 2020-03-07 (43) 41MB classic
  latest/candidate: ↑                            
  latest/beta:      ↑                            
  latest/edge:      v2.14.2 2020-03-08 (44)  4MB classic
installed:          v2.14.2            (43) 41MB classic
$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"

I alias git=hub in my .bash_aliases file.

@pckilgore pckilgore added the bug label Jun 19, 2020
@mislav mislav closed this as completed in 1781a3e Aug 2, 2020
@mislav
Copy link
Member

mislav commented Aug 2, 2020

Thank you for reporting! There are just too many subtle issues with hub in a snap, so I've changed our installation instructions to un-recommend it.

@pckilgore
Copy link
Author

pckilgore commented Aug 2, 2020

👍

@mcornella
Copy link

mcornella commented Dec 20, 2020

Thank you for reporting! There are just too many subtle issues with hub in a snap, so I've changed our installation instructions to un-recommend it.

The Ubuntu instructions should probably be changed to sudo apt install hub as well, as is now it looks like it's not recommended to use it on Ubuntu.

image

@mislav
Copy link
Member

mislav commented Dec 28, 2020

@mcornella You are welcome to submit a PR for our documentation!

Does apt install hub work for everyone and is the package up-to-date?

@mcornella
Copy link

mcornella commented Dec 28, 2020

Does apt install hub work for everyone

All maintained Ubuntu releases use apt, if that's what you mean, so it does work for everyone.

is the package up-to-date

Looks like both Debian and Ubuntu are using 2.7.0, while the current release is 2.14.2 (both package mantainers are the "Debian Go Packaging Team"). I see no reason not to change the Ubuntu docs then.

If you agree I'll submit a PR, like so:

diff --git a/README.md b/README.md
index 67fea91..8ba1a6f 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@ Fedora Linux | [DNF](https://fedoraproject.org/wiki/DNF) | `sudo dnf install hub
 Arch Linux | [pacman](https://wiki.archlinux.org/index.php/pacman) | `sudo pacman -S hub`
 FreeBSD | [pkg(8)](http://man.freebsd.org/pkg/8) | `pkg install hub`
 Debian | [apt(8)](https://manpages.debian.org/buster/apt/apt.8.en.html) | `sudo apt install hub`
-Ubuntu | [Snap](https://snapcraft.io) | [We do not recommend installing the snap anymore.](https://github.com/github/hub/issues?q=is%3Aissue+snap)
+Ubuntu | [apt(8)](https://manpages.ubuntu.com/manpages/focal/en/man8/apt.8.html) | `sudo apt install hub` ([we do not recommend installing the snap anymore](https://github.com/github/hub/issues?q=is%3Aissue+snap))
 openSUSE | [Zypper](https://en.opensuse.org/SDB:Zypper_manual) | `sudo zypper install hub`
 Void Linux | [xbps](https://github.com/void-linux/xbps) | `sudo xbps-install -S hub`
 Gentoo | [Portage](https://wiki.gentoo.org/wiki/Portage) | `sudo emerge dev-vcs/hub`
@mislav
Copy link
Member

mislav commented Jan 6, 2021

@mcornella Thanks for looking that up!

v2.7.0 is 3 years old. I don't want to give instructions to anyone that will result them in getting a buggy version of hub. I would rather that people manually download and unpack the tarball from our Releases page.

@mcornella
Copy link

mcornella commented Jan 7, 2021

That makes sense, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants