You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the feature or problem you’d like to solve
I would like to have the option to install gh, in Ubuntu, via snap.
Proposed solution
Add gh package to snap. In this early development phase it can be added to the candidate or betasnap channels and when stable add it to the stable channel.
How will it benefit CLI and its users?
Using snap the users will have a cleaner way to ensure that they are always using the latest gh version without the hassle to check for updates and reinstall the *.deb package on every update.
Reacted by Jay Petacat, Casper da Costa-Luis, Lukas Atkinson, Nicolas Morel, Mikhail Pavlov, adasiko, Anton Maminov, Vykintas Valkaitis, Anton Larionov, Alan Kay and 15 more
Reacted by undeadfox, Andrey Semashev, set-free, Dmitry Marakasov, Hadrien Patte, Daniel, Marcus Howser and gmanka
@popey I noticed you just forked this, and were also involved in discussions about a vim snap which was meant to be the first classic confinement ever but still doesn't exist. I've tried and couldn't get it to work :/
I'm 👎 on providing a snap for this project, mainly because the gh program needs to access the filesystem of the current directory and interface with other commands such as git and vim, and the containment philosophy of snaps restricts all of that. mislav/hub#2434mislav/hub#2330mislav/hub#2353mislav/hub#2479
the gh program needs to access the filesystem of the current directory and interface with other commands such as git and vim, and the containment philosophy of snaps restricts all of that.
I put git inside the gh snap (part of the containment philosophy is to not rely on external tools). There's no vim snap afaik so I haven't added that. Opening browsers and authentication via ssh also work.
Opening browsers and authentication via ssh also work.
Oh that's good to know, thank you! I thought that authentication also wouldn't work due to containerization (gh spawns a web server on localhost to act as a callback handler for OAuth).
We'll keep this open for a while so that we gather more feedback about Snap, and if the community-maintained package proves to be working well, we can recommend installing it in our installation instructions. For now, I feel it's still to early to link this from our README.
Sure. I think the only thing which doesn't work is vim but if you support other editors this would be easy to fix. It looks like other editos are supported by gh with nano as the default so I could fix that too.
Ok I think all features are now supported by (sudo) snap install --edge gh && (sudo) snap connect gh:ssh-keys. Let me know if anything is missing here (or open a PR at https://github.com/casperdcl/cli/pulls).
Sure. I think the only thing which doesn't work is vim but if you support other editors this would be easy to fix.
The same way that git allows configuring the editor, we respect GIT_EDITOR, VISUAL, or EDITOR environment variables and execute the path + arguments found within. The gh executable at runtime should then have privileges to execute an arbitrary child process (as specified by the user) and to wait for it to finish. Is this available to a snap running in classic mode?
Classic mode is discouraged in general AFAIK. Right now I've bundled nano and git in the snap, while opening an external browser works without classic. It's 36MB in total so doesn't look like bundling is an issue.
Activity
casperdcl commentedon Feb 13, 2020
Just added a package using the an experimental new
snapcraftfeature (canonical/snapcraft#2911 (comment)) 😄snap install --edge gh && snap connect gh:ssh-keys(possibly withsudo)I can't PR as the guidelines say they're only looking for bug fixes rather than features.
howbazaar commentedon Feb 14, 2020
sudo snap install --edge gh
[sudo] password for tim:
error: cannot perform the following tasks:
casperdcl commentedon Feb 14, 2020
Oops, should be fixed now
casperdcl commentedon Feb 15, 2020
Btw the
snapDoesn't support opening a browser andfixed nowvim@popey I noticed you just forked this, and were also involved in discussions about a
vimsnap which was meant to be the firstclassicconfinement ever but still doesn't exist. I've tried and couldn't get it to work :/mislav commentedon Feb 19, 2020
I'm 👎 on providing a snap for this project, mainly because the
ghprogram needs to access the filesystem of the current directory and interface with other commands such asgitandvim, and the containment philosophy of snaps restricts all of that. mislav/hub#2434 mislav/hub#2330 mislav/hub#2353 mislav/hub#2479jayschwa commentedon Feb 19, 2020
Snaps installed with the
--classicconfinement are allowed to do those things. However, there is a bug that causes failures when classic snaps interact: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1849753casperdcl commentedon Feb 19, 2020
I agree that snap restrictions are annoying.
I put
gitinside theghsnap (part of the containment philosophy is to not rely on external tools). There's novimsnap afaik so I haven't added that. Opening browsers and authentication via ssh also work.mislav commentedon Feb 19, 2020
Oh that's good to know, thank you! I thought that authentication also wouldn't work due to containerization (gh spawns a web server on localhost to act as a callback handler for OAuth).
We'll keep this open for a while so that we gather more feedback about Snap, and if the community-maintained package proves to be working well, we can recommend installing it in our installation instructions. For now, I feel it's still to early to link this from our README.
casperdcl commentedon Feb 19, 2020
Sure. I think the only thing which doesn't work is
vimbut if you support other editors this would be easy to fix. It looks like other editos are supported byghwithnanoas the default so I could fix that too.casperdcl commentedon Feb 20, 2020
Ok I think all features are now supported by
(sudo) snap install --edge gh && (sudo) snap connect gh:ssh-keys. Let me know if anything is missing here (or open a PR at https://github.com/casperdcl/cli/pulls).hackel commentedon Feb 20, 2020
Change the title from "Ubuntu installation" to "Support cross-platform installation via Snap" as this is not Ubuntu specific.
mislav commentedon Feb 20, 2020
The same way that git allows configuring the editor, we respect
GIT_EDITOR,VISUAL, orEDITORenvironment variables and execute the path + arguments found within. Theghexecutable at runtime should then have privileges to execute an arbitrary child process (as specified by the user) and to wait for it to finish. Is this available to a snap running in classic mode?casperdcl commentedon Feb 20, 2020
Classic mode is discouraged in general AFAIK. Right now I've bundled
nanoandgitin the snap, while opening an external browser works without classic. It's 36MB in total so doesn't look like bundling is an issue.JeremyRubin commentedon Aug 24, 2020
Would be nice if there was a way to make the snap from an official github/ms account on Snapcraft.
302 remaining items
update issue templates
update issue templates
update issue templates
update issue templates
update issue templates
update issue templates
update issue templates
update issue templates
update issue templates
update issue templates
update issue templates
update issue templates
update issue templates
update issue templates
update issue templates