Git repo sync - connection lost - android

I'm trying to download android source (Cyanogenmod). i have spent more than 12hrs to download 2.5GB files, Now my connection lost for a while, it shows
error: RPC failed; result=56, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
fatal: unable to access 'https://android.googlesource.com/platform/prebuilts/misc/': Could not resolve host: android.googlesource.com
fatal: unable to access 'https://github.com/CyanogenMod/android_packages_inputmethods_LatinIME/': Could not resolve host: github.com
fatal: unable to access 'https://android.googlesource.com/platform/prebuilts/misc/': Could not resolve host: android.googlesource.com
error: Cannot fetch CyanogenMod/android_packages_inputmethods_LatinIME
error: Cannot fetch platform/prebuilts/misc
error: Exited sync due to fetch errors
Can i resume the download or i should download from the beginning, please help me to resume my download.
Thank you!

Once you have applied the fix that I describe below, you should simply re-run repo sync in order to resume and fully complete the resource synchronization process that was interrupted by these fatal errors.
The solution to the DNS-related error that you've encountered [fatal: Could not resolve host] is detailed on the Known Issues resolution page at Google's AOSP Developer Site. Apply this fix by adding the appropriate host entry for your remote repository android.googlesource.com inside your development machine's /etc/hosts config file. Begin by clicking here and here to execute the IP address lookup tool provided by the free web resource: http://network-tools.com/nslook/.
Google's full description of this issue with detailed resolution I've included here:
Difficulties syncing the source tree (DNS issues).
Symptom: When running repo sync, the process fails with various errors
related to not recognizing the hostname. One such error is
<urlopen error [Errno -2] Name or service not known>.
EDIT: Another fatal error might be Could not resolve host.
Cause: Some DNS systems have a hard time coping with the high number
of queries involved in syncing the source tree (there can be several
hundred requests in a worst-case scenario).
Fix: Manually resolve the relevant hostnames, and hard-code those
results locally.
You can resolve them with the nslookup command, which will give you
one numerical IP address for each of those (typically in the "Address"
part of the output).
$ nslookup googlesource.com
$ nslookup android.googlesource.com
You can then hard-code them locally by editing /etc/hosts, and adding two
lines in that file, of the form:
aaa.bbb.ccc.ddd googlesource.com
eee.fff.ggg.hhh android.googlesource.com
Note that this will only work as long as the
servers' addresses don't change, and if they do and you can't connect
you'll have to resolve those hostnames again and edit etc/hosts
accordingly.

You don't resume a clone, you can try a shallow clone instead.
As mentioned here:
Error code 56 indicates a curl receive error of CURLE_RECV_ERROR which means there was some issue that prevented the data from being received during the clone process.
Typically this is caused by a network setting, firewall, VPN client, or anti-virus that is terminating the connection before all data has been transferred.
You can know more with:
set GIT_TRACE_PACKET=1
set GIT_TRACE=1
set GIT_CURL_VERBOSE=1
You can try changing http.postBuffer or switching to ssh url clone.

Spartan i checked the Cyanogenmod its working normally i prefer use internet download manager.i download 60mp and recall it.successfully fetched and resumed.

Could not resolve host: android.googlesource.com
Which could be a DNS server problem. Try first restarting your modem in order to flush its DNS cache. If you're still seeing the problem, try changing your Primary DNS to either one these two publicized DNS servers that Google operates:
8.8.8.8
8.8.4.4
Note that, if your Primary DNS has already been configured as described and you've also long-rebooted the router without resolution (pun intended), then adjusting your Primary DNS configuration to point at other public DNS servers is not likely to fix your situation. However, a reputable list of no-cost public servers can be found here.

Related

Not able to git push or pull in android studio 3.6

I'm getting the following error while trying to push or pull or anything with ssh in android studio 3.6
Update failed Invocation failed Unexpected Response from Server: Unauthorized java.lang.RuntimeException: Invocation failed Unexpected Response from Server: Unauthorized at org.jetbrains.git4idea.nativessh.GitNativeSshAskPassXmlRpcClient.handleInput(GitNativeSshAskPassXmlRpcClient.java:34) at org.jetbrains.git4idea.nativessh.GitNativeSshAskPassApp.main(GitNativeSshAskPassApp.java:30) Caused by: java.io.IOException: Unexpected Response from Server: Unauthorized at org.apache.xmlrpc.LiteXmlRpcTransport.sendRequest(LiteXmlRpcTransport.java:231) at org.apache.xmlrpc.LiteXmlRpcTransport.sendXmlRpc(LiteXmlRpcTransport.java:90) at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:72) at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194) at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185) at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178) at org.jetbrains.git4idea.nativessh.GitNativeSshAskPassXmlRpcClient.handleInput(GitNat..................
looks like the problem is with native ssh and we cannot change it to built-in like previous versions... how to fix this ???
any help would be appreciated
WORKAROUND:
1. In Android Studio go to Help - Find Action - Registry...
2. Find git.use.builtin.ssh and enable it
3. Check that git works again
Not straight solution - but you can change your git url from ssh to https, and it will work.
git remote set-url origin YOUR_REPOSITORY_HTTPS_URL
I have found an alternative way to make SSH actually work...
rate up if it worked for you!!!
using putty plink for ssh instead of the Git ssh(openSSH)
1.set the system env-variable GIT_SSH and let it point to plink.exe
download links available here: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
2.start pageant and add your private key to it (needs to be converted to another format to be used)(use puttygen to convert id_rsa to ppk)
3.use command in terminal based on github or gitlab : plink -v git#github.com or plink -v git#gitlab.com
congrats now you can work with ssh

Github Push failed: Failed with error: RPC failed; curl 56 LibreSSL SSL_read: error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3

When i am Trying to push my android project to GitHub i got this error
Failed with error: RPC failed; curl 56 LibreSSL SSL_read:
error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3 alert bad record
mac, errno 0 The remote end hung up unexpectedly The remote end hung
up unexpectedly
It can be caused by large files in your repo. Github has 100 MB limit for a single file in a repo. You might want to check it by using git lfs migrate info.
I've had the same issue but this particular error was intermittent. I occasionally have seen "error: GH001: Large files detected. You may want to try Git Large File Storage". Also when I switched to SSH for remote origin instead of HTTPS it gave me broken pipe error message.
I already used LFS but my .gitattributes missed some large files so I've updated it and run git lfs migrate import --include="*.fileextension" then pushed to github without an error. See https://help.github.com/articles/moving-a-file-in-your-repository-to-git-large-file-storage/.

Bitbucket : The requested URL returned error: 402

I changed password on bitbucket, and now Android Studio can't make push error on Event Log:
Push failed: Failed with error: fatal: unable to access 'https://USERNAME#bitbucket.org/USERNAME/REPOSITORY.git/': The requested URL returned error: 402
How to solve it?
This just happened to me and the fix was to remove some users from my repositories.
Bitbucket's free plan comes with unlimited private repos so, deleting your repos may not have any effect. However, you can only add a maximum of 5 users with the free plan.
This server response is due to the fact that you have exceeded the free limit for Bitbucket. You have two options:
Upgrade your Bitbucket server license
Delete some old repos you don't need anymore.

12:44:45 PM Push failed: fatal: repository not found but it exists

I am using Github to sync my Android Studio Project.
I have been able to commit and push successfully for over a month.
After adding some files, I received this error.
12:44:45 PM Push failed: fatal: repository 'https://rrtigga#github.com/rrtigga.GetDisciplined1_0.git/' not found
However, the repo exists...
Here is a snippet from my terminal:
Rohits-MacBook-Air:GetDisciplined1_0 Spicycurryman$ git remote add origin rrtigga#github.com:rrtigga/GetDisciplined1_0.git
fatal: remote origin already exists.
Rohits-MacBook-Air:GetDisciplined1_0 Spicycurryman$
This is kind of an awkward error... I did some research and was unable to produce a solution.
GitHub: ERROR: Repository not found. fatal: The remote end hung up unexpectedly (different from similar posts apparently)
EDIT: It really exists:
https://github.com/rrtigga/GetDisciplined1_0
What is the problem here and how can I fix it?
You have a remote called origin which is configured to point to https://github.com/rrtigga.GetDisciplined1_0.git/, which is not the correct URL for your repository. You should be using either https://github.com/rrtigga/GetDisciplined1_0.git for access over HTTPS, or git#github.com:rrtigga/GetDisciplined1_0.git for SSH.
The error "remote origin already exists" means what it says: you're trying to add a remote with the same name as one that already exists. You need to either delete it first with git remote rm origin, or use git remote set-url to change the URL of the existing remote.

Android SDK Manager - Failed to fetch

Error 1:
Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: Unknown Host www.google.de
Error 2:
Failed to fetch URL http://dl-ssl.google.com/android/repository/repository-10.xml, reason: IO Unknown Host www.google.de
Can I download and insert this xml files manually?
Are then this problems solved?
There are some people who has posted about downloading SDK tools without SDK manager.
Like in this site.
But you should check your internet connection. I have same problem but after that i came to know that it was because of bad internet connection.
I have retried it and it was downloaded successfully.
I encountered the same problem and here is what I did to solve the problem.
Since I use proxy server for accessing internet i have edited the file
"C:\Users\.AndroidStudio\config\options\other.xml" as
Notice the PROXY_HOST value there is no "http://" part, this is important. In my case when I insert that it did not work I did not know why.
2. I have edited the file
"C:\Users\\AppData\Local\Android\sdk\tools\android.bat"
I have changed the line at the end of android.bat file from
call "%java_exe% %REMOTE_DEBUG%" ....
to
call "%java_exe% **-Djava.net.preferIPv4Stack=true** %REMOTE_DEBUG%"...
Notice the value in bold

Categories

Resources