title: apt tools can't resolve host name
body: <p>I am trying to run <code>apt-get update</code> from a local virtualbox running Debian to pull packages in from a local apt-repository set up on another server on the local network (over a VPN). </p>
  
  <p>All other tools are perfectly able to resolve the host name of the local server hosting the apt repository. However, when I run <code>sudo apt-get update</code> I keep getting the following error message:</p>
  
  <pre><code>Ign https://[someserver.com/] dev Release.gpg
  Ign https://[someserver.com/] dev Release
  Err https://[someserver.com/] dev/main amd64 Packages
  
  Err https://[someserver.com/] dev/main amd64 Packages
  
  Ign https://[someserver.com/] dev/main Translation-en_GB
  Ign https://[someserver.com/] dev/main Translation-en
  Err https://[someserver.com/] dev/main amd64 Packages
    Couldn't resolve host '[someserver.com'
  W: Failed to fetch https://[someserver.com/dists/dev/main/binary-amd64/Packages]/  
      Couldn't resolve host '[someserver.com'
  
  E: Some index files failed to download. They have been ignored, or old ones used instead.
  </code></pre>
  
  <p>When I ping 'someserver.com', it comes back fine. If I try to retrieve the Packages list via wget on the command line, the retrieval is successful; it seems to be only apt that can't resolve the host name. </p>
  
  <p>Actually I changed someserver.com to google.com for a test, and it returned saying <code>Couldn't resolve '[google.com'</code></p>
  
  <p>btw. Are the square-brackets before the hostname as they appear in the error message  significant at all? I noticed that when i reverted back to using the official public debian repos, there are no square brackets around the hostnames at all in the log messages and that the update completes successfully. </p>
  
  <p>The entry in my sources.list file for the repo is as follows:</p>
  
  <pre><code>deb https://username:hex-encoded-password@someserver.com/ dev main
  </code></pre>
  
  <p>Any help would be appreciated.</p>