I'm working on laravel project and try to use github to share code with my colleagues. I can setup project use git clone command. But once my colleague update project and push server then my code already out of date. So how can get that new update to overwrite my existing using git command.Any advice or guidance on this would be greatly appreciated, Thanks
Rather than overwrite, the best practice is to replay ("rebase") your local commits (that you do not have pushed yet) on top of the remote (updated) branch.
With Git 2.6+, type:
git config --global pull.rebase true
git config --global rebase.autoStash true
From there, a simple git pull will be enough.
You can then test your local code on top of what your colleagues have already pushed.
So I'm wondering if there is a problem with the upstream master?
I'm not sure if this error happens when everything is updated already or if it's something different.
I have added upstream link with no problem, using
$ git remote add upstream https://github.com/udacity/course-collboration-travel-plans.git
just want to sync with the master now
Of course, your Repository URL: https://github.com/udacity/course-collboration-travel-plans.git is giving 404. There is no repository at your added remote.
Particularly I am seeing a typo in your remote URL collboration ==> collaboration. So, correct URL that should be added as a remote is:
https://github.com/udacity/course-collaboration-travel-plans.git
# Remove previously incorrect remote
$ git remote rm upstream
# Adding correct remote
$ git remote add upstream https://github.com/udacity/course-collaboration-travel-plans.git
Hope it helps.
I'm having trouble cloning a repo on git. I've been trying for to days and have tried quite a few solutions (in most the problem was slightly different but seemed to apply) but nothing has done anything to make a difference.
I've tried switching off the anti-virus and firewall but that didn't help.
I've also tried uninstalling and reinstalling the network adapter drivers (and restarting the computer) and that didn't work.
From what I understand it's a network issue somewhere as the remote server keeps hanging up but I'm not managing to get anywhere with the issue.
Using git clone -v --progress seemed to give the same output as git clone.
Output from git clone -v --progress https://github.com/mit-cml/appinventor-sources.git
Cloning into 'appinventor-sources'...
POST git-upload-pack (gzip 1425 to 774 bytes)
remote: Counting objects: 41649, done.
remote: Compressing objects: 100% (7/7), done.
error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
I've now tried increasing the buffer again
git config --global http.postBuffer 1048576000
but still nothing.
I'm following the solution from The remote end hung up unexpectedly while git cloning for troubleshooting.
I resolved the same problem by this:
git config http.postBuffer 524288000
It might be because of the large size of repository and default buffer size of git so by doing above(on git bash), git buffer size will get increase.
I had the same issue, and I have solved it by changing my net connection.
In fact, my last internet connection was too slow (45 kbit/s).
So you should try again with a faster net connection.
I had the same problem, and #ingyhere 's answer solved my problem .
follow his instructions told in his answer here.
git config --global core.compression 0
git clone --depth 1 <repo_URI>
# cd to your newly created directory
git fetch --unshallow
git pull --all
you need to increase the buffer size (it's due to the large repository size),
so you have to increase it
git config http.postBuffer 524288000
Althought you must have an initializd repository, just porceed as the following
git init
git config http.postBuffer 524288000
git remote add origin <REPO URL>
git pull origin master
...
git config --global http.postBuffer 524288000
Work in my case - AWS code commit
This happens when you push first time without net connection or poor net connection.But when you try again using good connection 2,3 times problem will be solved.
I have tried "git init" and it worked like charm for me.
I got it from the link Git push error: RPC failed; result=56, HTTP code = 200 fatal: The remote end hung up unexpectedly fatal
(based on anser from Hakan Fıstık)
You can also set the postBuffer globally, which might be necessary, if you haven't checkout out the repository yet!
git config http.postBuffer 524288000
Uninstalling(version: 2.19.2) and installing(version: 2.21.0) git client fixed the issue for me.
just Disable the Firewall and start again. it worked for me
It could be an issue with your network (i.e. not an issue with any of your git configs, firewall, or any other machine settings). To confirm this, you could test the following:
See if this issue persists on the same network on different machines (this was true for me).
Try running the problematic git command (for me it was git pull) on a different network and see if it works. I brought my desktop over to a friend's and confirmed that the command did indeed work without any modifications. I also tested the command from my laptop on an open network nearby and the command also started suddenly working (so this was also true for me)
If you can confirm #1 and #2 above, it may be time to schedule an appointment with a technician from your ISP. I have fiber internet in a fairly newish building and when the technician arrived they went to my building's telecom room and switched my internet port. That somehow seemed to fix the issue. He also let me know that there were other issues at large going on in my building (so it could have nothing to do with your machine or things in your control!).
If that fails, maybe consider switching internet providers if that's an option for you. Else, just keep calling your ISP to send in more and more senior technicians until it gets resolved.
I'm hoping nobody actually has to resort to what I did to find the problem.
tl;dr: Give your ISP a call as the issue could be one with your network.
All these tips did not work for me,
what worked was cloning over ssh rather than http
Following steps helped me to fix this issue,
Solution 1:
git checkout master
git pull
git checkout [you current branch]
git pull
You can also set git config http.postBuffer 524288000 to increase the network buffer
Solution 2:
Sometimes it happens when you are cloning your repo using VPN and it fails to verify the SSL
Try this out it may help:
git config http.sslVerify "false"
I had the same issue and found out the problem was with my internet speed, after getting on a better connection the problem was solved solved.
Before cloning just run "git init". It will create local .git and it will allow for clone.
If you have VPN opened, close and try it again.
It's mentioned as SSL_ERROR_SYSCALL, errno 10054.
To resolve this SSL issue I went to .gitconfig file (which is located in c drive in my desktop) I changed sslverify to false and added my username and email id.
sslVerify = `false` //make sslVerify as false
[user]
name = `***<Enter your name>**`
email = `**<Email Id>**`
I had the exact same problem while trying to setup a Gitlab pipeline executed by a Docker runner installed on a Raspberry Pi 4
Using nload to follow bandwidth usage within Docker runner container while pipeline was cloning the repo i saw the network usage dropped down to a few bytes per seconds..
After a some deeper investigations i figured out that the Raspberry temperature was too high and the network card start to dysfunction above 50° Celsius.
Adding a fan to my Raspberry solved the issue.
What I did is moved the dependencies list to the end of
#Pods for <app>
In Podfile. Like this:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target '<app>' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for <app>
target '<app>Tests' do
inherit! :search_paths
# Pods for testing
end
target '<app>UITests' do
inherit! :search_paths
# Pods for testing
end
pod 'Firebase/Core'
pod 'Firebase/Database'
end
In my case, its something wrong with my DNS server, after i add a new github.com record in the hosts, the problem solved.
13.114.40.48 github.com
1. Go to https://gitforwindows.org
2. Download
3. Install (no need to uninstall)
4. That's it! No more error: RPC failed; curl 56 OpenSSL SSL_read: No error
I too have faced this issue today. I have tried all the options shared in this thread but I was still having the issue.
I tried cloning after connecting to my corporate VPN and cloning got completed successfully. So, guys it might have to do with your local firewall policy. Factor in that as well :)
This is what works for me.
git config --global http.sslVerify "false"
For me, git config --global http.postBuffer 524288000 alone did not fix it, I had to run git config --global core.compression 0 as well.
this issue is resolved by cloning using SSH key.
first of all set the ssh key and then add it to your git/github account. and then try to clone using ssh instead of using http.
in my case this solved my problem.
i tried all the other solution including increasing the buffer size, changing the git version, etc.
none of these solution works in my case.
I've tried postBuffer, core.compression and --depth 1, nothing is working perfectly, I mean sometimes, I could clone but most of the time, I got the same error. For me, it got worked out by cloning using SSH url. You can follow below steps to clone in ssh way
create ssh key
create .ssh folder in your user directory (C:\Users\Rence Abishek\) and inside .ssh folder, create a file named id_rsa
Open your terminal from user dir and execute below commands to create ssh private and public key
ssh-keygen -t rsa -b 4096 -C "renceabishek#abc.com"
press y to override existing file i.e id_rsa and not require to give passphrase, just hit enter
eval $(ssh-agent -s)
ssh-add ./.ssh/id_rsa
copy ssh key to your git version control(gitlab,bitbucket,github..etc)
Execute cat ./.ssh/id_rsa.pub command in terminal to get public key in console, now copy that and go to your GIT version control setting and add your copied public key.
Github -> click on your profile(top right cornor) -> setting -> SSH and GPG Keys -> New SSH Key button
clone repo
Now clone using ssh url git clone YOUR_SSH_URL
try this,
git init first/reinitialize
then, global http.postBuffer 157286400
after that, just set/add ur remote like before
add, commit, push. this solves mine
For me the issue was with my wifi extender. When I connect directly to my wifi without using extender, it started working.
I'm having trouble pushing an update to a pod (Audiobus).
"pod trunk push" seems to successfully validate (downloads the git repository, builds, etc), but then drops out with a 403 Forbidden error when doing a POST to /api/v1/pods with the podspec content, along with the message:
"Source code for your Pod was not accessible to CocoaPods Trunk. Is it a private repo or behind a username/password on http?"
I have verified that I'm registered ("pod trunk me" shows I am logged in with correct email address, an owner of the pod).
The repository once required HTTP authentication, but after seeing the above error, I disabled auth. I've verified that there's now open access to the git repository by cloning the repository from a separate, unauthenticated machine (git clone https://developer.audiob.us/download/SDK.git test --single-branch --depth 1 --branch 2.2).
Is this a bug in trunk.cocoapods.org? What am I missing?
Cheers in advance,
Michael
Make sure to make your repo commit tag name the same version name you have on your package podspec file.
I'm surprised by this also, this has been running for a few weeks now and this is the first time a problem has come up. When I run the command locally I don't see a problem. I don't know if you've edited the question, but I had a reference to https://developer.audiob.us/download/SDK.git/?url=download/SDK.git which didn't work with the git ls-remote. Perhaps it doesn't redirect like git clone does?
Any one who may come upon this issue but the other answer does not help. Make sure you have the correct branch in your podspec. Having the incorrect branch will also cause this error to occur.
Here is my problem
I am using heroku to develop an app and I am using github along with it for a project.
Now when I try and use github(clone) without heroku to work on a different project it says...
michael#michael-HP-PavilionNotebook-PC:~$
michael#michael-HP-PavilionNotebook-PC:~$
michael#michael-HP-PavilionNotebook-PC:~$ git init
Initialized empty Git repository in /home/michael/.git/
michael#michael-HP-PavilionNotebook-PC:~$ ls
Desktop Downloads gifiniti Music Pictures Templates Ubuntu One
Documents examples.desktop gifinitiApr24 oldgifiniti Public tmp Videos
michael#michael-HP-PavilionNotebook-PC:~$ git clone git#github.com:toadiferus/SecretTunnel
Cloning into SecretTunnel...
! Invalid path.
! Syntax is: git#heroku.com:<app>.git where <app> is your app's name.
fatal: The remote end hung up unexpectedly
michael#michael-HP-Pavilion-dv6700-Notebook-PC:~$
How would I resolve this error? Can't find any support online for this specific problem.
HOw can I change the syntax of the commands? I want to just clone a project from github not heroku.
THANKS!
Michael
Your ~/.ssh/config may have been hijacked by if you used the heroku accounts plugin. Same thing happened to me. I removed the contents of my ssh config and all is well!
Firstly, you don't need to init before you clone - init is used to turn a project folder into a git repository unless you really intended to turn your entire user directory into a git repo? I would suggest you delete the .git folder that would have been created from your doing this.
To be sure you're using the correct path go to your projects on github and use the icon that looks like a clipboard to copy the correct url to your clipboard, paste onto your command line and see what happens then.
I also don't understand why when you do a
git clone git#github.com:toadiferus/SecretTunnel
Cloning into SecretTunnel...
you get what looks like a Heroku push error??? Git clone from a github URL should simply clone the project from github to your local machine.
! Invalid path.
! Syntax is: git#heroku.com:<app>.git where <app> is your app's name.
Are you editing the output you are pasting?
The git url should have .git on the end, ie. git#github.com:toadiferus/SecretTunnel.git.