Skip to content

gh installed at /usr/gh on Ubuntu #4023

@itajsh

Description

@itajsh

Describe the bug

On ubuntu-cinnamon-remix 20.04

I ran the installation command from:
https://github.com/cli/cli/blob/trunk/docs/install_linux.md

curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh

apt installation passed without errors.
gh executable is not in my $PATH dirs.
it is at /usr/gh

Steps to reproduce the behavior

  1. Install ubuntu-cinnamon-remix 20.04
  2. install git
  3. install gh with the ubuntu instructions

Expected vs actual behavior

I guess it should have been installed at /usr/bin/gh

Logs

+ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg
+ sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
[sudo] password for itaj: 
+ sudo tee /etc/apt/sources.list.d/github-cli.list
++ dpkg --print-architecture
+ echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main'
+ sudo apt update
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://ppa.launchpad.net/ubuntucinnamonremix/all/ubuntu focal InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,126 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [245 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [282 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [13.8 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [363 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [52.5 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [843 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [339 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:15 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [10.3 kB]
Get:16 https://cli.github.com/packages stable InRelease [3,743 B]                                                                                                                                                                                                                                                                                         
Get:17 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]                                                                                                                                                                                                                                                                                
Get:18 https://cli.github.com/packages stable/main amd64 Packages [338 B]                                                                                                                                                                                                                                                                                 
Get:19 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [748 kB]                                                                                                                                                                                                                                                                      
Get:20 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [149 kB]                                                                                                                                                                                                                                                                      
Get:21 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [24.5 kB]                                                                                                                                                                                                                                                              
Get:22 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [8,024 B]                                                                                                                                                                                                                                                               
Get:23 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [633 kB]                                                                                                                                                                                                                                                                  
Get:24 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [97.5 kB]                                                                                                                                                                                                                                                                 
Get:25 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [60.9 kB]                                                                                                                                                                                                                                                          
Get:26 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2,464 B]                                                                                                                                                                                                                                                        
Fetched 5,333 kB in 12s (430 kB/s)                                                                                                                                                                                                                                                                                                                        
Reading package lists... Done
Building dependency tree       
Reading state information... Done
16 packages can be upgraded. Run 'apt list --upgradable' to see them.
+ sudo apt install gh
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  gh
0 upgraded, 1 newly installed, 0 to remove and 16 not upgraded.
Need to get 6,939 kB of archives.
After this operation, 26.1 MB of additional disk space will be used.
Get:1 https://cli.github.com/packages stable/main amd64 gh amd64 1.13.0 [6,939 kB]
Fetched 6,939 kB in 3s (2,339 kB/s)
Selecting previously unselected package gh.
(Reading database ... 329135 files and directories currently installed.)
Preparing to unpack .../archives/gh_1.13.0_amd64.deb ...
Unpacking gh (1.13.0) ...
Setting up gh (1.13.0) ...
Processing triggers for man-db (2.9.1-1) ...
itaj@dpercu:~/software$ gh config set git_protocol ssh

Command 'gh' not found, but can be installed with:

sudo snap install gh       # version 1.12.1-pre.0-15-gbf5b34d0, or
sudo apt  install gitsome  # version 0.8.0+ds-4

See 'snap info gh' for additional versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-1Affects a large population and inhibits work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions