$sudo apt-get update
Fetched 1,499 kB in 13s (107 kB/s)
W: Failed to fetch http://debian.datastax.com/enterprise/dists/stable/main/binary-i386/Packages 401 Unauthorized
E: Some index files failed to download. They have been ignored, or old ones used instead
Original Post: http://www.datastax.com/support-forums/topic/datastax-enterprise-installation-error
you are giving invalid credentials used in the datastax.sources.list file.
To add a DataStax repository file called /etc/apt/sources.list.d/datastax.sources.list:
$ echo "deb https://dsa_email_address:password@debian.datastax.com/enterprise stable main" | sudo tee -a /etc/apt/sources.list.d/datastax.sources.list
where dsa_email_address and password are the DataStax Academy account credentials you created on the registration page.
Attention: Depending on your environment, you might need to replace @ in your email address with %40 and escape any character in your password that is used in your operating system's command line. Examples: ! and \|.