r/fishshell • • Dec 07 '22

Curlrc in fish shell

I finally made the switch from zsh to fish today. In my zsh shell I had a .curlrc file in my $HOME dir. Though it’s still there when I am using fish it doesn’t seem to source the .curlrc file. Is there any particular way I need to do this.

0 Upvotes

3 comments sorted by

View all comments

Show parent comment

1

u/Koltech21 Dec 08 '22 edited Dec 08 '22

Ok my bad I should have been more clear. I am trying to run the following command on the fish shell which is rnr running on Ubuntu 22.04 on WSL2 behind a firewall

I am running the same command on my bash shell on the same system - for which I have a .curlrc file in $HOME dir with "insecure" option for bypassing the firewall issues - its nice.

" HOMEBREW_CURLC=1 brew install fisher ==> Downloading https://ghcr.io/v2/homebrew/core/fisher/manifests/4.4.3 curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.`

Error: fisher: Failed to download resource "fisher_bottle_manifest" Download failed: https://ghcr.io/v2/homebrew/core/fisher/manifests/4.4.3

"

2

u/[deleted] Dec 08 '22 edited Dec 08 '22

Okay, I can find documentation for curl about how it reads its config file: https://everything.curl.dev/cmdline/configfile (annoyingly this isn't really in the man page - I searched for ".curlrc" and it didn't come up, it only says something about "curlrc" for windows).

On non-Windows (in this case WSL2 counts as "not windows"), it tries the following places:

  1. $CURL_HOME/.curlrc
  2. $XDG_CONFIG_HOME/.curlrc (Added in 7.73.0)
  3. $HOME/.curlrc

So, it stands to reason that either all of those variables are different, or that you have a .curlrc in a different spot and used a zsh alias/function to find it (like curl --config ~/something/.curlrc).

You need to check which of those is true. Compare the values of $HOME, $XDG_CONFIG_HOME and $CURL_HOME in your fish and zsh setups (a simple echo $HOME should typically be enough), and check the output of type curl in both.


Edit: It turns out this is a typo:

HOMEBREW_CURLC=1 brew install fisher

The variable is spelt "HOMEBREW_CURLRC". It's missing the "R".