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

Can't install the git PPA in WSL? #5491

Closed
leungi opened this issue Jun 25, 2020 · 6 comments
Closed

Can't install the git PPA in WSL? #5491

leungi opened this issue Jun 25, 2020 · 6 comments

Comments

@leungi
Copy link

leungi commented Jun 25, 2020

Environment

Windows build number: 
> Microsoft Windows [Version 10.0.17134.1550]

Your Distribution version: 
> leungi@DHOHNHL1S2:~$ lsb_release -r
> Release:        18.04

Whether the issue is on WSL 2 and/or WSL 1: 
> leungi@DHOHNHL1S2:~$ cat /proc/version
Linux version 4.4.0-17134-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #1488-Microsoft Mon May 05 16:17:00 PST 2020

Steps to reproduce

Trying to add external repo for latest package version.

sudo add-apt-repository ppa:git-core/ppa

There's a related #3557, but closed without much solution walk-through.

Following this SO post didn't resolve it.

wsl-apt-add-error

Expected behavior

Following the repo add, expected apt list to show added repo.

$ apt list -a git
Listing... Done
git/bionic 1:2.26.0-1~ppa1~ubuntu18.04.1 amd64 [upgradable from: 1:2.17.1-1ubuntu0.5]
git/bionic-updates,bionic-security,now 1:2.17.1-1ubuntu0.5 amd64 [installed,upgradable to: 1:2.26.0-1~ppa1~ubuntu18.04.1]
git/bionic 1:2.17.0-1ubuntu1 amd64

Actual behavior

Cannot add PPA: 'ppa:~git-core/ubuntu/ppa'.
ERROR: '~git-core' user or team does not exist.
@sr229
Copy link

sr229 commented Jun 26, 2020

I don't think the PPA exists yet for this specific Ubuntu version, AFAIK you should be using the default distro provided git.

@leungi
Copy link
Author

leungi commented Jun 26, 2020

Thanks for comment @sr229; launchpad does show it being built for 18.04.

image

@sr229
Copy link

sr229 commented Jun 26, 2020

That's weird, I also tried it myself but the PPA adds correctly, might be your network connection?

@leungi
Copy link
Author

leungi commented Jun 27, 2020

Finally solved the issue, thanks to some useful posts; steps as follow:

  1. add PPA manually
  • sudo add-apt-repository 'deb http://ppa.launchpad.net/git-core/ppa/ubuntu focal main'
  1. try sudo apt update. If it complains about The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5523BAEEB01FA116, do:
  1. run sudo apt update for final refresh 🙌

@leungi leungi closed this as completed Jun 27, 2020
@SeanDongX
Copy link

SeanDongX commented Aug 27, 2021

This so worked for me
basically it's a proxy issue for me, you need to add -E to the command to preserve the env vars
sudo -E add-apt-repository ppa:...

@noamzilo
Copy link

For me it was a synchronization issue. the host time got messed up and had to be synchronized again. Check the date is correct with date. If not, use sudo rdate -n <IP_OF_TIME_PROVIDER>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants