Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio to BitBucket push error - self signed certificate in certificate chain

I've just started using Android Studio (v1.5.1 for Windows 7) and I want to be able to use BitBucket over HTTPS with it (I have Git v2.7.1.0 installed). I have followed instructions on how to set it up from here, which all seemed very straightforward.

However, when it comes to pushing my project to BitBucket it always fails with a "Push failed" error, the latest one being
fatal: unable to access 'https://USERNAME@bitbucket.org/USERNAME/MYPROJECT.git/': SSL certificate problem: self signed certificate in certificate chain

The self signed certificate (selfcert.cer) was created from my browser while on BitBucket's website, which I read somewhere I had to do.

This is all new to me so I'm not really sure what to try next.

like image 581
AlanPartridge Avatar asked Mar 14 '23 06:03

AlanPartridge


1 Answers

Self signed certificate could be accepted running following command in command line

> git config http.sslVerify false

other git command should work after this.

This should be just temporary solution as it has security implications. Proper way to fix this is to import certificate. Detail here on https://confluence.atlassian.com/fishkb/unable-to-clone-git-repository-due-to-self-signed-certificate-376838977.html or refer How can I make git accept a self signed certificate?

like image 125
Baha Avatar answered Mar 15 '23 19:03

Baha