# SourceTree Cloning Repository ERROR: "HTTP Basic: Access denied" ###### tags: `SourceTree` `Git` [TOC] ## Error explanation: You may already have a **SourceTree Account & Bitbucket Account**. All you need last was to clone the project you are making with your coworkers. However, when cloning the repository, it will ask you an account and password. > Note: Account and password are from Bitbucket [color=red] When you typed wrong, the system will remember the wrong information, causing you be enable to clone your project. **ERROR SHOWN:** ``` Error: remote: HTTP Basic: Access denied fatal: Authentication failed for ... ``` ## Solution Used Go to the SourceTree file and find the following files: 1. passwd 2. userhosts ### Error in password If it was the password that you input wrongly, you can just delete passwd file. When cloning again, they will ask the password again. ### Error in account/user Use sublime to open the userhosts file and change the account to the correct one. ### See below for file location: > **Windows Users:** [color=lightBlue] ``` C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree\passwd file C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree\userhosts ``` > **Mac Users:** [color=pink] ``` ~/Library/Application Support/SourceTree ``` ## Posible Solutions found These solutions did not work for me, however, you may still try them out. As some did work for other people. ### Posible Solution 1 1. Go to Control Panel 2. Go to Users 3. Go to Accounts/Manage Your Credentials/Windows Credentials 4. Delete github.com under 'Generic Credentials' After deleting it should ask your account/password when cloning. ### Posible Solution 2 1. Check that Git is installed. **Git Download Link:** https://git-scm.com/downloads 2. Go to cmd and run as Administrator 3. Use the command below. ``` git config -–system -–unset credential.helper ``` The steps above should help you clean up those incorrect account and passwords.