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

隐身守侯 提交于 2019-11-28 06:45:11
Sree

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.

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.

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!!!

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.

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.

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!