Broken pipe error using Stash's git push (both http&https)
-
[alphabear-solver]$ git push https://github.com/wizardofozzie/alphabear-solver.git Attempting to push to: https://github.com/wizardofozzie/alphabear-solver.git, branch: refs/heads/master stash: <class 'urllib2.URLError'>: <urlopen error [Errno 32] Broken pipe>
I'm getting the same error trying to push the commit to GitHub irrespective of whether I use http or https.
The weird thing is, another repo worked perfectly fine just prior to trying to push this repo (using https, http threw an error).
Can anyone enlighten me as to what the issue here is? (Pythonista 3, latest Stash version)
-
So, 1 & 2 don't work as I posted above, @JonB
I really appreciate the help.Let me rephrase the problem: if I delete the GitHub repo, how can I push my folder to GitHub?
-
Sorry, i was wrong about a few of the commands:
git fetch origin
( although fetch claims to accept a url, it really wants a remote name)
git merge origin/master
( the argument is required, apparantly)For keygen, sorry, should be:
ssh-keygen -trsa -b2048
creates a rsa key.pbcopy ~/.ssh/id_rsa.pub
copies it to the clipboard. You then go to github settings/ssh keys, and click the create new key button, and paste it in with a title of your choice.
I am updating the gh command to easily add keys without this extra step.
-
just to be clear: you have commits locally, but none in github?
Delete the github repo, then create it without the auto option (bare repo).
As an example:
[~/Documents]$ mkdir example [~/Documents]$ cd example [example]$ git init . [example]$ echo hello world > Readme.md [example]$ git add Readme.md Adding Readme.md [example]$ git commit Commit Message: First commit Author Name: jb Save this setting? [y/n]y Author Email: jb Save this setting? [y/n]y f065a0f14eaaa9777ea250ab5b9e3a2226ea2991 [example]$ gh create example -i Created https://github.com/jsbain/example [example]$ git remote origin https://github.com/jsbain/example.git [example]$ git push
-
[~/Documents]$ cd alphabear-solver/ [alphabear-solver]$ git init . stash: <type 'exceptions.OSError'>: [Errno 17] File exists: './.git' [alphabear-solver]$ ls -h usage: ls.py [-h] [-1] [-a] [-l] [files [files ...]] positional arguments: files files to be listed optional arguments: -h, --help show this help message and exit -1, --one-line List one file per line -a, --all do not ignore entries starting with . -l, --long use a long listing format [alphabear-solver]$ ls -1a .git README.md ab.py dictionary.txt hashdict.py map.json solver.py [alphabear-solver]$ rm .git .git: is a directory [alphabear-solver]$ rm -r .git [alphabear-solver]$ git init . [alphabear-solver]$ git add * Adding README.md Adding ab.py Adding dictionary.txt Adding hashdict.py Adding map.json Adding solver.py [alphabear-solver]$ git commit Commit Message: bare Pythonista commit Author Name: wizardofozzie Save this setting? [y/n]y Author Email: djsim4242@gmail.com Save this setting? [y/n]y 628238a51a09ccbff9d389e2a27cd340d4ffe640 [alphabear-solver]$ gh create alphabear-solver -i Created https://github.com/wizardofozzie/alphabear-solver [alphabear-solver]$ git remote origin https://github.com/wizardofozzie/alphabear-solver.git [alphabear-solver]$ git push Attempting to push to: https://github.com/wizardofozzie/alphabear-solver.git, branch: refs/heads/master stash: <class 'urllib2.URLError'>: <urlopen error [Errno 32] Broken pipe> [alphabear-solver]$
Same issue
-
hmm, strange. i followed your example and it worked.
Can you check your dulwich version?import dulwich print(dulwich.__version__)
Also, go ahead and update stash:
selfupdate dev
and force quit pythonista, and restart it.run
gh create_key stash
to create a ssh key and link it with your github account.Then,
git remote origin ssh://git@github.com/wizardofozzie/alphabear-solver.git
and then trygit push
This may be a stupid question, but is your user and password stored corrctly?
import keychain print([s for s in keychain.get_services() if s[0]=='stash.git.github.com'][0]) print(keychain.get_password(*[s for s in keychain.get_services() if s[0]=='stash.git.github.com'][0]))
This should be exactly your github login info.
-
Dulwich version
(0,12,2)
Keychain checks out.
gh create_key stash
[alphabear-solver]$ gh create_key stash stash: <class 'github.GithubException.GithubException'>: 422 {u'documentation_url': u'https://developer.github.com/v3/users/keys/#create-a-public-key', u'message': u'Validation Failed', u'errors': [{u'field': u'key', u'message': u'key is already in use', u'code': u'custom', u'resource': u'PublicKey'}]}
-
sounds like you already set up ssh keys. so you should be able to set up the remote url using ssh.
-
@JonB said:
sounds like you already set up ssh keys. so you should be able to set up the remote url using ssh.
Ok, I appreciate it.
Happy to work ssh on stash out myself, but can you tell me where to start?
I appreciate all your helpEDIT: Dulwich error on SSH
[alphabear-solver]$ git remote origin ssh://git@github.com/wizardofozzie/alphabear-solver.git [alphabear-solver]$ git push Attempting to push to: ssh://git@github.com/wizardofozzie/alphabear-solver.git, branch: refs/heads/master [alphabear-solver]$ git push Attempting to push to: ssh://git@github.com/wizardofozzie/alphabear-solver.git, branch: refs/heads/master stash: <class 'dulwich.errors.HangupException'>: The remote server unexpectedly closed the connection. [alphabear-solver]$ ```
-
you seem to have a real iffy connection ( your earlier entry had a bunch of those hangup errors, followed by success). I think that literally meant that your connection was dropped. Just try git push a few times until you get something other than this error.
Are you on wifi or wireless? Or dial up?
I am going to write a ping command for stash tonight, and maybe we can test your connection. I am not sure, but it is likely that both errors could be caused by your connection literally dropping out.
-
I am on Wifi swapping to 4G when it fails (in pasted log)
As I said in Slack, updating dulwich as per your recommendation, seems to have done the trick.
There was an error saying something about an error renaming to dulwich.old but restarting worked