You will receive following error when deploying an Operating System using SCCM 2012 Task Sequence;
401 - Authentication failure on request with anonymous access, retrying with context credentials.
401 - Authentication failure on request with context credentials, retrying with supplied credentials.
Network access account credentials not supplied
Reason for the error is; Network access account is not specified or not configured.
Configuring Network Access Account:
Go to Administration ->Site Configuration ->Sites
Then Right click on site then go to Configure Site Components ->Software Distribution
On the Software Distribution Components properties go to Network Access Account and set an account.