Search code examples
gitclone

Can't clone git repo into my server machine "remote: HTTP Basic: Access denied"


I'm trying to clone my repo into my production ubuntu server machine. When I clone it into my MacBook with https or with SSH everything is ok but when I try to clone it in my ubuntu server it says remote: "HTTP Basic: Access denied". I saw many topics about it on stack overflow but none of the answer worked for me.

I precise it says "remote: HTTP Basic: Access denied" only when I use HTTPS. When I use SSH it freezes then its says 5 min later a time out message. Am I missing something? SSH keys missing? 2FA? why can I clone on my mac and not on my ubuntu server?


Solution

  • It seems to be an authentication error. You must either check SSH keys or check user and password. Use these commands if you didn’t.

    git confg --global user.name “your name” git confg --global user.email “your email”

    or

    Make sure credentials are right. This command allows you to reenter the password.

    git config --system --unset credential.helper