doomemacs / doomemacs/core

`doom upgrade` support `--retry-when-failed` option.

Open
#6,458 2 comments 1 reaction 0 assignees View on GitHub
core:cli
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

### Describe your request

In China :cn: we can't access github well without VPN, but this would lead to another problem:
```
> Executing 'doom sync -u' with Emacs 29.0.50 at 2022-06-15 19:34:52
> Synchronizing your config with Doom Emacs...
> Regenerating envvars file at "~/.emacs.d/.local/env"
✓ Successfully generated "~/.emacs.d/.local/env"
> Installing packages...
- No packages need to be installed
> (Re)building packages...
- No packages need rebuilding
> Updating recipe repos...
> Updating packages (this may take a while)...
x The package manager threw an error
x Last 25 lines of straight's error log:
$ git rev-parse --verify --abbrev-ref HEAD
master
[Return code: 0]
$ cd /home/colawithsauce/.emacs.d/.local/straight/repos/emacsmirror-mirror/
$ git merge-base --is-ancestor master origin/master
[Return code: 0]
$ cd /home/colawithsauce/.emacs.d/.local/straight/repos/emacsmirror-mirror/
$ git merge-base --is-ancestor origin/master master
[Return code: 0]
$ cd /home/colawithsauce/.emacs.d/.local/straight/repos/emacsmirror-mirror/
$ git rev-parse HEAD
634e620eaa04afb10ea292bd039137667fe546d4
[Return code: 0]
$ cd /home/colawithsauce/.emacs.d/.local/straight/repos/melpa/
$ git rev-parse HEAD
2710ca2d6c8ca2ab9b44f319a6bde8e3b41ce94a
[Return code: 0]
$ cd /home/colawithsauce/.emacs.d/.local/straight/repos/melpa/
$ git config --get remote.origin.url
https://github.com/melpa/melpa.git
[Return code: 0]
$ cd /home/colawithsauce/.emacs.d/.local/straight/repos/melpa/
$ git fetch origin
fatal: unable to access 'https://github.com/melpa/melpa.git/': OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
[Return code: 128]
! Extended backtrace logged to ~/.emacs.d/.local/doom.error.log
```

`SSL_ERROR_SYSCALL` would appear randomly when we guys in China do `git fetch` via VPN. This is my `~/.gitconfig`
```
$ cat ~/.gitconfig
[http]
proxy = http://127.0.0.1:7890
sslBackend = openssl
[https]
proxy = http://127.0.0.1:7890
sslBackend = openssl
```
This is really disturbing when I want to do another things. So I have to use the follow command as a workaround.
```sh
$ until doom sync -u; do; echo "Failed... again...."; done
```

### Briefly explain its use-case

1. When you want to upgrade doom
2. type `doom upgrade --retry-when-failed`
3. CLI would retry "git fetch origin" when the `SSL_ERROR_SYSCALL` occurred.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.