I can't clone my Git repository from Bitbucket Cloud to my server. I SSHed into my website's server (not local), and then tried to do:
git clone https://[email protected]/myusername/reel-visuals.git
Right after entering my password, this is the exact error I get:
error: while accessing https://[email protected]/myusername/reel-visuals.git/info/refs
fatal: HTTP request failed
I'm definitely entering in the correct username and password.
What am I doing wrong? Is this a permissions issue on my Bitbucket repo or something? If so, how do I fix it?
Start by verifying you have the right cloning URL for your repository. Visit your repository in the BitBucket web UI, navigate to the "Source" panel, click the "Clone" button in the top right and then select HTTPS and copy the correct URL. The rest of this answer assumes you prefer HTTP cloning, although SSH might be preferable if you've correctly set up your SSH keys (outside the scope of this answer).
Next check connectivity from your server to BitBucket cloud, with a command like the following (replacing with your real URL):
wget -v -S https://[email protected]/myusername/reel-visuals.git
Pay attention to the printed HTTP response codes from the server (if any). Working output should include a HTTP/1.1 200 OK
code, possibly preceded by some 30x redirection codes. You'll need to investigate and address any error codes you see at this stage, which could include things like DNS lookup failures, connections blocked by firewall rules, or SSL problems like cipher handshake failure or outdated root certificates.
Finally, re-do your clone command and add -v -v
to request verbose output:
git clone -v -v https://[email protected]/myusername/reel-visuals.git
This should print additional status diagnostics which might give some more clues about what went wrong.
Finally, you might try upgrading your git
client software if you're running a very old version, since BitBucket cloud servers generally run very recent git versions and there might be compatibility problems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With