With a quick test I can't reproduce this with %40 as encoding, but I
will try some more later.

I would highly recommend to NOT write your authentication information in
sources.list through. Beside the parsing problem you seem to encounter,
you can't reasonably change the permission of the file (it has to be
world-readable to have apt-based tools in a functional state).

Instead, create the file /etc/apt/auth.conf and and use the netrc(5)
format to specify the authentication tokens. You can change the access
permissions to this file to your liking (600 for example) as a bonus.

Example: echo 'machine example.org\nlogin star\npassword hunter2' >
/etc/apt/auth.conf

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1558484

Title:
  Ubuntu 12.04: apt-get can't parse repository url if username contains
  @ ('at' sign)

Status in apt package in Ubuntu:
  New

Bug description:
  Reporting a bug as suggested in 
https://answers.launchpad.net/ubuntu/+question/288658
  I attached Vagrantfile that reproduces the problem in which I try to add the 
following repositories to apt:

  deb https://FOO@BAR:p...@not-existing-domain.com/xyz precise non-free
  deb https://FOO%40BAR:p...@not-existing-domain.com/xyz precise non-free

  ---

  For both URLs the error message on Ubuntu 12.04 is the same:

  Failed to fetch https://domain.com/xyz/dists/precise/non-free/binary-
  amd64/Packages  Couldn't resolve host 'BAR'

  $ lsb_release -a
  Distributor ID:       Ubuntu
  Description:  Ubuntu 12.04.5 LTS
  Release:      12.04
  Codename:     precise
  $ apt-get --version
  apt 0.8.16~exp12ubuntu10.26 for amd64 compiled on Aug  5 2015 19:06:57

  ---

  On Ubuntu 14.04 the URL is parsed correctly as in both cases the
  following error message is printed:

  Failed to fetch https://not-existing-domain.com/xyz/dists/precise/non-
  free/binary-i386/Packages  Could not resolve host: not-existing-
  domain.com

  $ lsb_release -a
  Distributor ID:       Ubuntu
  Description:  Ubuntu 14.04.4 LTS
  Release:      14.04
  Codename:     trusty
  $ apt-get --version
  apt 1.0.1ubuntu2 for amd64 compiled on Jan 12 2016 20:13:58

  For security reasons I prefer not to disclose the real repository URL,
  but it works on Ubuntu 14.04 and doesn't work on 12.04.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1558484/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to