I've tried to clone a repo using the ssh
it loads in terminal and then abruptly sticks on a certain percentage and either remains there or throws an error -
client_loop: send disconnect: Broken pipe 173.39 MiB | 2.89 MiB/s
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
I've looked here tried using compression, shallow cloning and retrieving the rest, it does the same, sticks on a certain percentage,
my internet is working fine, I tried downloading other repo (with http) they download quickly.
Note that the tag "github-actions" used on this question would suggests a GitHub remote job cloning the repository in a GitHub runner on GitHub side, not on a personal macos workstation.
But assuming you are cloning on macos:
if an SSH URL git#github.com:... is an issue, check first if switching to an HTTPS URL would work better: git clone https://github.com/...
check if you can clone the same repository from a different network to rule out any firewall or ISP issue
Related
I'm having issues connecting to a Bitbucket repository using SSH. I have the public and private keys set up correctly. I'm worried that the issue is due to the fact that I"m working on a Windows 10 machine. Does anyone know how to get around the following error:
*setsockopt IPV6_TCLASS 8: Operation not permitted:
repository access denied. deployment key is not associated with the requested repository.
fatal: Could not read from remote repository .
Please make sure you have the correct access rights and the repository exists.*
I know I am in the repository. I can check out different branches in the repository and commands such as "git add" and "git commit" appear to work, however, "git push" is failing due to the above mentioned error.
Thank you
Make sure to use the latest Git for Windows (2.19.1) and, as I mentioned here, try a git push -4 ...
That will force the use of IPV4, to check if that would work better.
As detailed in this thread:
For me it's an IPv6 issue.
BitBucket doesn't respond to IPv6 ssh requests, so you have to wait for it to timeout.
I fixed it by adding:
AddressFamily inet
to /etc/ssh/ssh_config and git pull responds within seconds not minutes.
The last part is only valid if you are using an SSH URL, and for git pull, but might still have an effect for git push.
As noted by xpt in the comments, WSL issue 1869 says it OK to put AddressFamily inet into ~/.ssh/config, but I've just tried it, and it was not working for me, until I put it into /etc/ssh/ssh_config instead.
Thank you everyone for your help. There were two issues causing this.
First, the IPV6 warning itself was resolved once I upgraded from git version 2.7.4 to 2.19.1.
After making this adjustment I still saw an error "Permission denied (publickey)..."
I resolved this error by moving the private key, id_rsa, to the following location:
/c/Users//.ssh/
Everything seems to be in order now.
I'm working on a Windows machine, from git bash.
We recently moved our project from a TFS server to a git repo on the same server. As far as I know, this was all done in one commit. I am remote.
When I run git clone <url> the clone will start, but at some seemingly arbitrary point (a different one every time), it will fail with:
error: RPC failed; curl 56 Recv failure: Connection was reset
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
I was thinking perhaps if there were a way to clone the repo a few files at a time, that would work. It seems unlikely that such a solution exists. I have tried increasing the http.postBuffer to 157286400, and I do not think switching to ssh is an option for us currently. A shallow clone is unhelpful, as there has only been one commit. These are the solutions I've seen elsewhere. Any help would be greatly appreciated.
Intent
I intend to establish a version control service in a windows local network.
Test Environment
I have a /root folder where there are 2 repos /foo and /bar
Attempts
I was advised to use a git-daemon service (http://git-scm.com/docs/git-daemon) but it's been more complicated to implement (and works differently) from advertised.
The first guide i found was http://railsware.com/blog/2013/09/19/taming-the-git-daemon-to-quickly-share-git-repository/. I used their git daemon options in the '/root' folder that would serve all repos contained therein:
$ git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose
I was succesful in cloning an empty repo but when I added some content this the message i got:
$ git clone git://root-ip-addr/bar
Cloning into 'bar'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
fatal: read error: Invalid argument
Receiving objects: 100% (3/3), done.
fatal: error in sideband demultiplexer
Next i found http://www.gitguys.com/topics/creating-a-shared-repository-users-sharing-the-repository/ where they don't even mention the daemon but instead went for a local-folder-as-remote aproach. I still think I need a daemon so what I tried was making my repos bare while adding the -enable:receive-pack option on the daemon.
They advise to use branches on the client machines to commit so I did. I also committed to the master branch to see what happens. In both cases GIT seems to stall.
Here is a screenshot of the client machine attempting to push to the central hub. You can see that it stalls at that point.
Here is a screenshot of the central hub running the daemon.
I can only key in ctrl+c to stop the git daemon altogether after that.
The only way that I've actually gotten it to work was calling the daemon from inside the repo, but that would entail having to do that for every repo (i intend to establish this for hundreds of repos)
I understand that I should dedicate a couple of weeks to thoroughly understanding Git, something that I've postponed for the past 6 months, since I've been able to get by with basic clones, adds and commits.
Having said that, i think there should be more visually constructive guides when attempting to explain the git workflow metaphor.
Thank you for your time.
It seems that it is related to bug #101 (issue 457 on google code) in msysgit and a fix was introduced in Git-1.9.4-preview20140611.
Setting the sendpack.sideband config option and than push again works.
git config --global sendpack.sideband false
git push origin ...
I tried it with this git daemon command
git daemon --base-path=. --export-all --reuseaddr --informative-errors \
--verbose --enable=receive-pack
I set up a Debian server that uses SSH for shell access and git repos. I created a bare repo on it and using ssh was able to clone it to my Windows 8 workstation, however when trying to push changes back to the Debian server I get the error depicted here:
Read from remote host 174.52.5.192: Connection reset by peer
fatal: sha1 file '<stdout>' write error: invalid argument
fatal: The remote end hung up unexpectedly
error: failed to push some refs to 'git#174.52.5.192:/home/git/repos/space-junk.git/'
I use this work station regularly for shell access to the same server via SSH so I know inability to access SSH isn't the problem.
Does anyone have any idea what's going wrong?
Actually, the first push should be:
git push -u origin master
That will link the local branch master to its remote tracking one origin/master
Then, after that first push, you will be able (for all the subsequent push) to do a simple:
git push
See more at "Why do I need to explicitly push a new branch?".
I got it working! It turns out the proper command was
git push origin master
The Windows version didn't have a descriptive enough error message but I got it working by switching over to Linux, which told me my command was wrong.
I have git installed on my local windows 7 PC. I can commit there.
I have git installed on my linux dev server. I can commit there.
I have successfully cloned to each machine a github repository. So they seem to be working in that sense. But I'd like to be able to push from my PC to the dev server.
I believe that I am missing a crucial piece of info here and can't find any tutorials, questions answered on how to set this up.
I have a few questions:
I was led to believe that I don't NEED to set up ssh keys to do this, I will just be prompted for a password.
My site was developed in php, is it possible to push to the linux server and have the live dev site continue running, with the new changes?
Here is how I'm currently trying to clone from my linux server and the response... (i changed the IP address)
C:\DevEnv>git clone 0.0.0.0:gitrepo.git
Cloning into 'gitrepo'...
fatal: The remote end hung up unexpectedly
I have a directory called gitrepo.git that has a repository.
I also tried creating a repository in the home dir of mysite.com. When I try cloning that from my PC this is what happens:
C:\DevEnv>git clone http://mysite.com
Cloning into 'mysite.com'...
fatal: http://mysite.com/info/refs not valid: is this a git repository?
I've read through many tutorials and they mostly talk about either really really basic concepts, or how to push/pull to github, or just skip over certain settings so when I follow them I get fatal: The remote end hung up unexpectedly...
Any help, point in the right direction would be most appreciated!
You may need to provide your username. For example:
$ git clone myusername#myhost.com:/opt/git/project.git
Or you could setup a samba-share on the Linux box and share your git-repo, mount the share in windows and clone it from the filesystem.
More info about setting up git on a server:
http://progit.org/book/ch4-0.html
Check path to your project.
Try to clon via git protocol:
C:\DevEnv>git clone git://0.0.0.0/gitrepo.git