What gives Hyperledger fabric a ssl legitimacy error when I use -k/--insecure? - ssl

I'm trying to install the binaries for Hyperledger fabric but I run into an error.
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.
I do know this means i need to put -k or --insecure in the curl statment. However I am doing so and it doesn't work.
curl --insecure -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 2.3.0 1.4.9
when I run this the first half is fine, the hyperledger/fabric-samples repo clone will succeed.
Here is the entire output
\Clone hyperledger/fabric-samples repo
===> Cloning hyperledger/fabric-samples repo
Cloning into 'fabric-samples'...
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 7386 (delta 2), reused 8 (delta 0), pack-reused 7366
Receiving objects: 100% (7386/7386), 4.26 MiB | 905.00 KiB/s, done.
Resolving deltas: 100% (3823/3823), done.
===> Checking out v2.3.0 of hyperledger/fabric-samples
Pull Hyperledger Fabric binaries
===> Downloading version 2.3.0 platform specific fabric binaries
===> Downloading: https://github.com/hyperledger/fabric/releases/download/v2.3.0/hyperledger-fabric-windows-amd64-2.3.0.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
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.
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
==> There was an error downloading the binary file.
------> 2.3.0 platform specific fabric binary is not available to download <----
I am still a student so it could easily be a stupid problem, but I'm really stuck. So please can someone help me?

So, the problem was -k/--insecure was not good enough i had to change it for all connections with :
echo insecure >> ~/.curlrc

Related

Hyperledger Fabric error: "TLS: bad certificate server" when installing chaincode

I'm just starting learning HLF, and I have an error while following tutorial from the docs: link
I downloaded fabric-samples using this command (replaced bit.ly link with the destination):
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s -- 2.2.2 1.4.9
I run logspout in one terminal and try to execute peer lifecycle chaincode install basic.tar.gz in another one, and this is the result i get
Error: failed to retrieve endorser client for install: endorser client
failed to connect to localhost:7051: failed to create new connection:
context deadline exceeded
Log presented by Logspout:
peer0.org1.example.com|2022-03-15 13:03:24.452 UTC [core.comm]
ServerHandshake -> ERRO 04a Server TLS handshake failed in 2.650245ms
with error remote error: tls: bad certificate server=PeerServer
remoteaddress=172.22.0.1:61126
I set the envs in terminal as instructed in the docs, and I checked that CORE_PEER_TLS_ROOTCERT_FILE variable points to an existing file. The content of the file is the same as on the container.
What I tried to do:
download fabric-samples again and redo all the setup with copy-pasting the commands directly from docs
Do you have any suggestions where I can look for an issue?
I resolved the problem, I was using peer version 2.2.1 from previous experiments, it probably collided with FABRIC_CFG_PATH

RPC failed; Curl 56 OpenSSL error when deploying app to heroku

I keep getting the following error when i try to push my application using heroku.
numerating objects: 62, done.
Counting objects: 100% (62/62), done.
Delta compression using up to 12 threads
Compressing objects: 100% (57/57), done.
Writing objects: 100% (62/62), 16.52 MiB | 25.21 MiB/s, done.
Total 62 (delta 5), reused 0 (delta 0), pack-reused 0
error: RPC failed; curl 56 OpenSSL SSL_read: error:140943FC:SSL routines:ssl3_read_bytes:sslv3 alert bad record mac,
errno 0
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date
What I've tried:
Increasing postBuffer size
git config --global http.postBuffer 52428800000
deleting/ reinitializing git init
somethings that may be relevant.
-The app size is about 140MB.
I use express, multer, sessions
Any help would be appreciated..
Had the same issue and I used this command to fix the issue:
git push heroku master --force

How did you install nvm?

I wasn't able to install using the curl command.
Here's the transcript:
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13527 100 13527 0 0 13527 0 0:00:01 --:--:-- 0:00:01 48138
=> Downloading nvm from git to '/cygdrive/c/MikesStuff/Pers/Dropbox/Personal/home/.nvm'
=> Cloning into '/cygdrive/c/MikesStuff/Pers/Dropbox/Personal/home/.nvm'...
remote: Enumerating objects: 288, done.
remote: Counting objects: 100% (288/288), done.
remote: Compressing objects: 100% (258/258), done.
Receiving objects: 87% (251/288)sed 95 (delta 18), pack-reused 0Receiving objects: 8
Receiving objects: 100% (288/288), 146.70 KiB | 2.72 MiB/s, done.
Resolving deltas: 100% (35/35), done.
error: invalid path 'test/fast/Aliases/"nvm alias" should not accept aliases with slashes'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
Failed to clone nvm repo. Please report this!

HTTP error when installing pytorch

I use ubuntu14.04, without GPU.
when I install pytorch in anaconda(I type command just as pytorch.org says),things always get wrong,like this:
------------------------------------------------------------
Fetching package metadata ...........
Solving package specifications: .
Package plan for installation in environment /home/zhanglu/anaconda3:
The following NEW packages will be INSTALLED:
pytorch: 0.1.9-py36_2 soumith
torchvision: 0.1.7-py36_1 soumith
The following packages will be UPDATED:
conda: 4.3.8-py36_0 --> 4.3.13-py36_0
Proceed ([y]/n)? y
pytorch-0.1.9- 100% |################################| Time: 0:02:49 1.44 MB/s
pytorch-0.1.9- 100% |################################| Time: 0:05:52 692.97 kB/s
pytorch-0.1.9- 100% |################################| Time: 0:01:15 3.23 MB/s
CondaError: CondaHTTPError: HTTP None None for url <None>
Elapsed: None
An HTTP error occurred when trying to retrieve this URL.
ConnectionError(ReadTimeoutError("HTTPSConnectionPool(host='binstar-cio-packages-prod.s3.amazonaws.com', port=443): Read timed out.",),)
CondaError: CondaHTTPError: HTTP None None for url <None>
Elapsed: None
An HTTP error occurred when trying to retrieve this URL.
ConnectionError(ReadTimeoutError("HTTPSConnectionPool(host='binstar-cio-packages-prod.s3.amazonaws.com', port=443): Read timed out.",),)
CondaError: CondaHTTPError: HTTP None None for url <None>
Elapsed: None
An HTTP error occurred when trying to retrieve this URL.
ConnectionError(ReadTimeoutError("HTTPSConnectionPool(host='binstar-cio-packages-prod.s3.amazonaws.com', port=443): Read timed out.",),)
----------------------------------------------------------------
I've tried many times, but every time error occurs in the same step.
I'm looking forward your answers,thanks very very much for your help!!!
Please update to the latest version of Navigator.
Open a terminal (on Linux or Mac) or the Anaconda Command Prompt (on windows)
and type
$ conda update anaconda-navigator

RVM install using wrong URL

I'm trying to install ruby-1.9.3-p194 using RVM and it is failing. It looks like the reason is that it is trying to download the source from bad urls. The output I get is:
% rvm install ruby-1.9.3-p194
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.10/x86_64/ruby-1.9.3-p194.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/robertlooby/.rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (22) The requested URL returned error: 404 Not Found
The requested url does not exist(22): 'http://cache.ruby-lang.org/pub/ruby/./ruby-1.9.3-p194.tar.bz2'
Checking fallback: http://ftp.ruby-lang.org/pub/ruby/./ruby-1.9.3-p194.tar.bz2
Checking fallback: http://www.mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby/./ruby-1.9.3-p194.tar.bz2
No fallback URL could be found, try increasing timeout with:
echo "export rvm_max_time_flag=20" >> ~/.rvmrc
There has been an error fetching the ruby interpreter. Halting the installation.
In each of the requested URLs where it has /./ it should have /1.9/. Any idea how to fix this or what is causing it?
I am using version 1.26.4 of RVM