Search code examples
gitmsysgittortoisegit

msysgit is giving errors in Windows 7 32bit computer


I'm trying to clone code from the git server. I'm using windows 7, 32bit computer. I installed msysgit and TortoiseGit.

But whenever I tried the clone command, I'm getting the following error:

git.exe clone   --progress -v  "http://vcs.hiit.fi/git/hiit_wfa" "C:\Users\athukora\Desktop\HIIT wide focus area\hiit_wfa"

Cloning into 'C:\Users\athukora\Desktop\HIIT wide focus area\hiit_wfa'...
error: The requested URL returned error: 401 (curl_result = 22, http_code = 401, sha1 = 9b1b551b5e4b7c7666df38c129d1ecc480c77347)
error: Unable to find 9b1b551b5e4b7c7666df38c129d1ecc480c77347 under http://vcs.hiit.fi/git/hiit_wfa
Cannot obtain needed object 9b1b551b5e4b7c7666df38c129d1ecc480c77347
while processing commit 876cb1098d91238e87c239b8151eeba5330f4480.
error: Fetch failed.

Can someone please help me to figure out the reason for this problem?


Solution

  • You're cloning a repository via HTTP protocol, and the server needs authentication (401 error is "Authentication required".

    Provided you have credentials for the repoistory, you need to provide user name in URL:

    git.exe clone   --progress -v  "http://usernname@vcs.hiit.fi/git/hiit_wfa" "<path>"
    

    Git will then prompt you for password.

    See this post for other ways to provide your credentials.