Karthik
Karthik

Reputation: 5033

Getting "Repositroy test has failed" error while cloning repository from Gitlab in Android Studio?

I will like to clone my android code from gitlab repository in Android Studio 0.8.1.I checked into VCS >> Checked out from Version Control >> Git >> Added HTTP url here.It prompts me that "Repositroy test has failed".Kindly help me to sort out the issue.I have checked the plugins as well.Thanks a lot.

Upvotes: 38

Views: 58741

Answers (8)

Adrian Smith
Adrian Smith

Reputation: 1073

Try unchecking the "Clone git repositories using SSH".

enter image description here

Upvotes: 1

Benjamin Shakeri
Benjamin Shakeri

Reputation: 315

I opened the HTTP URL in browser, that my collaborator sent me:

https://github.com/mansonpeter/GoUpApp/invitations

for download and join the developing team, there was an accept button, after accepting hopefully the error gone, repository test was successful and I got the project in android studio. before this I had tried all the suggestion on this page and non of them was efficient.

Upvotes: 1

Sumukh Bhandarkar
Sumukh Bhandarkar

Reputation: 384

Goto Settings > Version Control > Git and set SSH Executable to "Native" instead of "Built-in". Then restart your IDE for settings to apply.

Worked for me in all jetbrains IDEs.

Upvotes: 0

Christopher Kikoti
Christopher Kikoti

Reputation: 2713

I am on Ubuntu 16.04 (this applies to other versions as well) and all I needed to do was to install git from apt-get:

sudo apt-get install git

This means Android Studio was trying to execute git command but it could not be recognized so if you have git installed then try to execute git from terminal and if not recognized then you should configure paths to git executable. That was it!!!

Upvotes: 2

Ishmael MIRZAEE
Ishmael MIRZAEE

Reputation: 1210

I'm in Linux, At first check you have the appropriate certification to know this you can clone the repository in terminal if you get error similar this

fatal: unable to access 'https://YourDomainName/Project/GitRepository/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

then open your domain in browser and click on lock in the left of url go to detail and press export to save the certification and finally copy the content of the file and pase it into

/etc/ssl/certs/ca-certificates.crt

For me this solution for the issue worked.

Upvotes: 0

Sree
Sree

Reputation: 3194

You need to download and install git from http://git-scm.com/downloads

Then you need to track the git.exe on AndroidStudio:

  • Go to Settings > Project Settings > Version Control > VCSs > Git > Path to Git executable

  • Select (or type) executable path, eg: D:\Program Files (x86)\Git\cmd\git.exe

If you installed GitHub Desktop for Windows

In case you have GitHub Desktop for Windows, git.exe will be found at C:\Users\YOUR_USER_NAME\AppData\Local\GitHub\PortableGit_c7e0cbde92ba565zz218z5214zzz0e854zzza28\cmd.

Upvotes: 64

Sebastian Holler
Sebastian Holler

Reputation: 31

If you Installed git from http://git-scm.com/downloads and also sett the correct path and still get an error maybe you sit behind a Proxy, in this case you have to add the Proxy to the git. This is Possible in the gitconfig. Wich should be avaiable in :\Program Files (x86)\Git\etc if you used the standard path for installation.

Upvotes: 3

Graph
Graph

Reputation: 602

Just to add to Sree's answer, I was getting this error even after installing Git, but the problem is that I didn't install it to the default installation folder.

After choosing the right path and folder in the VCS settings tab, it worked beautifully.

Upvotes: 1

Related Questions