Tag Archives: git

Error: RPC failed; HTTP 504 curl 22 the requested URL returned error: 504 gateway time out

The following error is reported when using git clone Code:

Cloning into ‘FanHeIOSV2’…

error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out

fatal: The remote end hung up unexpectedly

The solution is to add — depath = 1:1

git clone –depth=1 https://git.oschina.net/xxxxxx.git  

Solve the problem of prompt “failed to sync branch” when using Git

When an empty git project is created and a large number of local files are copied in, and you want to do any git operation, you will be reported
as soon as possible

failed to sync this branch
You might need to open a shell and debug the state of this repo.

Maybe you’ll follow the instructions

debug xxx

But it doesn’t work

The actual reason is that there is no initialization

Do it in the current directory

git init

It’s OK

There was a problem with the editor ‘vi’


There was a problem with the editor ‘vi’


submitted the code through git commit-m 'modify message' in the project. It was found that the modify message submitted was not accurate, so I wanted to modify it. Use the git commit -amend command to modify modify message. After editing the message in vim, the w+q exits with an error and the 0 message1 fails to save,
2
The error message is:






error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.


Solutions:







git config --global core.editor /usr/bin/vim

Amend git commit --amend is OK this time.
Reference:

http://tooky.co.uk/there-was-a-problem-with-the-editor-vi-git-on-mac-os-x/

Prometheus 500 Internal Privoxy Error exception resolution

Prometheus 500 Internal Privoxy Error exception resolution
An exception while accessing Prometheus web-ui

Privoxy encountered an error while processing your request:
Could not load template file no-server-data or one of its included components.
Please contact your proxy administrator.
If you are the proxy administrator, please put the required file(s)in the (confdir)/templates directory. The location of the (confdir) directory is specified in the main Privoxy config file. (It's typically the Privoxy install directory).

The solution
, over the wall software is abnormal because the global agent is opened. Change the global agent to automatic agent to solve

OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

The github project was suddenly unavailable with Git today, error reporting:
Fatal: unable to access “https://github.com/dmlc/xgboost.git/” : OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com: 443
It doesn’t work in all kinds of ways. I found many ways on the Internet:
https://blog.csdn.net/daerzei/article/details/79528153
 
https://stackoverflow.com/questions/49345357/fatal-unable-to-access-https-github-com-xxx-openssl-ssl-connect-ssl-error
 
If that doesn’t work, try switching to a network, such as a hotspot or your own broadband connection, because you may be using a company Intranet and have a proxy set up.
If not, I don’t know what to do

pathspec commit did not match any files known to git

Quotes can actually go wrong.
C:\lysoftware\gitprj\fsdgit>git commit -m ‘first commit’
Error: pathspec ‘commit’ does not match any known git file
C:\lysoftware\gitprj\fsdgit>git submission -m “first submission”
93 document changes, 4453 insertions (+)
Create schema 100644 .classpath
Create mode 100644 .project
Create mode 100644 .settings/org.eclipse.core.resources. create mode 100644 .settings/org.eclipse. jdk .apt.core. create mode 100644 .settings/org.eclipse. jdk .core. create mode 100644 .settings/org.eclipse. jdk .core. prefs
Create schema 100644 .settings/org.eclipse. t2 .core.prefs

macos LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

The following error occurred while submitting Git today:

LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

Then I tried git clone other repositories, also reporting this error.
The proxy is used, but the solutions given by others, such as restart and reset commands, do not work.
Finally, a solution was found:

vim ~/.gitconfig

Delete the HTTPS configuration and you’re done. The proxy configuration was written to a file, so it’s no wonder Git doesn’t work.
reference
[1]. SSL_connect: SSL_ERROR_SYSCALL in connection to github.com: 443. https://stackoverflow.com/questions/48987512/ssl-connect-ssl-error-syscall-in-connection-to-github-com443
 

win10 unable to start ssh-agent service, error :1058 solution

Reference [https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/] set up SSH key, use the command SSH - add ~ /. SSH/id_rsa result Error
Error connecting to the agent: Unable to start ssh-agent: ssh-agent, error:
unable to start ssh-agent service, error :1058

win+R opens the service to see if the "OpenSSH Authentication Agent" service is enabled. If it is "disabled", set the service to "Automatic" and then open the service

Bitcoin Bitcoin node installation

A series of articles on how Bitcoin makes money, an online currency invented by computer hackers, has no borders, no government and no center. No government printing money, no inflation. In the global computer network, the free realization of currency exchange and circulation.
This series of articles is about procedures and strategies, not mining…
About the author:
Zhang (zhang Conan), programmers/Quant: Java, R, Nodejsblog: http://blog.fens.meemail: [email protected]
Reprint please indicate the source:

bitcoin比特币节点安装

preface
The first step of quantitative transactions is to obtain data, so the most direct way to obtain bitcoin data is to build a bitcoin client, directly from the bitcoin public chain above the synchronous ledger to obtain data. The foundation of the Bitcoin network is based on centrless nodes and transparency, so that each node can get the full amount of data in the Bitcoin network.
So, let’s start by building a Bitcoin client node.
directory
The

    bitcoin installation process starts the node of bitcoin

Bitcoin installation process
The procedure for installing the Bitcoin client from the source code is divided into the following seven steps:

    1. download the library from github switch to the latest version of the installation system dependent library run autogen.sh script run configure script run make and make install verify that bitcoin has been installed successfully </ol b> Now, let’s do it step by step. The Linux system environment used in this article is Linux Ubuntu 16.04 LTS 64bit.
    1. 1.1 Download the codlibrary from Bitcoin’s official Github.
    1. The process of installing Git is not much more than a simple command apt Install Git.

> git clone https://github.com/bitcoin/bitcoin.git
> cd bitcoin

1.2 Find the latest TAG version as V0.16.0.


> git tag
noversion
v0.1.5
...
v0.16.0
v0.16.0rc1
v0.16.0rc2
v0.16.0rc3
v0.16.0rc4
v0.2.0
...
v0.9.3
v0.9.3rc1
v0.9.3rc2
v0.9.4
v0.9.5
v0.9.5rc1
v0.9.5rc2

Switch to the latest version of the branch.


> git checkout v0.16.0

1.3 Install the system tools that need to be depended on, here will use Libtool, pkg-config, libboost, libDB toolkit, need to install in advance.


> apt install libtool
> apt install pkg-config
> apt install libboost-all-dev
> apt install libdb5.3++-dev 
> apt install libevent-dev

1.4 Compile with the./ Autogen.sh script,


> ./autogen.sh 

1.5 Run the configure script
When you’re done, you find that the current target has generated a configure file, and then run the configure file. At run time, a BerkerlyDB error occurs specifying that a version 4.8 BerkerlyDB is required. There are two solutions. The first solution is to download the corresponding version of BerkerlyDB. Second, skip this step. Let’s start with the second approach and skip the BerkeleyDB compatibility check.


> ./configure
configure: error: Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)

> ./configure --with-incompatible-bdb

1.6 Perform make and make install.


> make 
> make install

1.7 Verify that bitcoin has been installed successfully
Verify that the bitcoin installation is successful. There are two commands bitcoind and BitcoI. We need to check if this boot command is installed in the system environment.
Bitcoind, the node used to start Bitcoin, synchronizes ledger data. Bitcoin-cli, used to communicate with bitcoind nodes.
View the system installation location of the boot command.


> which bitcoin-cli
/usr/local/bin/bitcoin-cli

> which bitcoind
/usr/local/bin/bitcoind

View the help information for bitcoind and Bitcoin-CLi commands, respectively.


> bitcoind -help
> bitcoin-cli -help

That completes the installation of the client of Bitcoin.
2. Start the Bitcoin node
Start bitcoin’s core client program with the bitcoind command. Before running it, I’ll define a bitcoin.conf configuration file to set up the user accessing RPC-JSON.
New configuration file.bitcoin/ Cobit.conf. Set the RPC user’s account and password. Please set it according to the requirements of complex password setting. The configuration item for the official recommended Bitcoin.conf file, open the file.


> vi .bitcoin/bitcoin.conf

rpcuser=bsspirit
rpcpassword=98jfidayelqlvjieJDIjda

Start the BitcoIND server and write the data to /data/ BTC directory to print out the output in the console.


> bitcoind -datadir=/data/btc -conf=/root/.bitcoin/bitcoin.conf -printtoconsole

2018-05-30 01:51:06 Bitcoin Core version v0.16.0 (release build)
2018-05-30 01:51:06 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2018-05-30 01:51:06 Assuming ancestors of block 0000000000000000005214481d2d96f898e3d5416e43359c145944a909d242e0 have valid signatures.
2018-05-30 01:51:06 Setting nMinimumChainWork=000000000000000000000000000000000000000000f91c579d57cad4bc5278cc
2018-05-30 01:51:06 Using the 'sse4' SHA256 implementation
2018-05-30 01:51:06 Using RdRand as an additional entropy source
2018-05-30 01:51:06 Default data directory /root/.bitcoin
2018-05-30 01:51:06 Using data directory /data/btc
2018-05-30 01:51:06 Using config file /root/.bitcoin/bitcoin.conf
2018-05-30 01:51:06 Using at most 125 automatic connections (1024 file descriptors available)
2018-05-30 01:51:06 Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2018-05-30 01:51:06 Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2018-05-30 01:51:06 Using 4 threads for script verification
2018-05-30 01:51:06 scheduler thread start
2018-05-30 01:51:06 HTTP: creating work queue of depth 16
2018-05-30 01:51:06 Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation.
2018-05-30 01:51:06 HTTP: starting 4 worker threads
2018-05-30 01:51:06 Using wallet directory /data/btc
2018-05-30 01:51:06 init message: Verifying wallet(s)...
2018-05-30 01:51:06 Using BerkeleyDB version Berkeley DB 5.3.28: (September  9, 2013)
2018-05-30 01:51:06 Using wallet wallet.dat
2018-05-30 01:51:06 CDBEnv::Open: LogDir=/data/btc/database ErrorFile=/data/btc/db.log
2018-05-30 01:51:06 Cache configuration:
2018-05-30 01:51:06 * Using 2.0MiB for block index database
2018-05-30 01:51:06 * Using 8.0MiB for chain state database
2018-05-30 01:51:06 * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2018-05-30 01:51:06 init message: Loading block index...
2018-05-30 01:51:06 Opening LevelDB in /data/btc/blocks/index
2018-05-30 01:51:07 Opened LevelDB successfully
2018-05-30 01:51:07 Using obfuscation key for /data/btc/blocks/index: 0000000000000000
2018-05-30 01:51:08 LoadBlockIndexDB: last block file = 0
2018-05-30 01:51:08 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=1, size=293, heights=0...0, time=2009-01-03...2009-01-03)
2018-05-30 01:51:08 Checking all blk files are present...
2018-05-30 01:51:08 LoadBlockIndexDB: transaction index disabled
2018-05-30 01:51:08 Opening LevelDB in /data/btc/chainstate
2018-05-30 01:51:08 Opened LevelDB successfully
2018-05-30 01:51:08 Using obfuscation key for /data/btc/chainstate: 6adad0af82f188f1
2018-05-30 01:51:08 Loaded best chain: hashBestChain=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f height=0 date=2009-01-03 18:15:05 progress=0.000000
2018-05-30 01:51:08 init message: Rewinding blocks...
2018-05-30 01:51:09 init message: Verifying blocks...
2018-05-30 01:51:09  block index            2369ms
2018-05-30 01:51:09 init message: Loading wallet...
2018-05-30 01:51:09 nFileVersion = 160000
2018-05-30 01:51:09 Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total
2018-05-30 01:51:09  wallet                   67ms
2018-05-30 01:51:09 setKeyPool.size() = 2000
2018-05-30 01:51:09 mapWallet.size() = 0
2018-05-30 01:51:09 mapAddressBook.size() = 0
2018-05-30 01:51:09 mapBlockIndex.size() = 279999
2018-05-30 01:51:09 nBestHeight = 0
2018-05-30 01:51:09 Imported mempool transactions from disk: 0 succeeded, 0 failed, 0 expired, 0 already there
2018-05-30 01:51:09 AddLocal(103.211.167.71:8333,1)
2018-05-30 01:51:09 Discover: IPv4 eth0: 103.211.167.71
2018-05-30 01:51:09 Bound to [::]:8333
2018-05-30 01:51:09 Bound to 0.0.0.0:8333
2018-05-30 01:51:09 init message: Loading P2P addresses...
2018-05-30 01:51:09 torcontrol thread start
2018-05-30 01:51:09 Loaded 2445 addresses from peers.dat  9ms
2018-05-30 01:51:09 init message: Loading banlist...
2018-05-30 01:51:09 init message: Starting network threads...
2018-05-30 01:51:09 dnsseed thread start
2018-05-30 01:51:09 net thread start
2018-05-30 01:51:09 addcon thread start
2018-05-30 01:51:09 init message: Done loading
2018-05-30 01:51:09 opencon thread start
2018-05-30 01:51:09 msghand thread start
2018-05-30 01:51:09 New outbound peer connected: version: 70015, blocks=525031, peer=0
2018-05-30 01:51:11 New outbound peer connected: version: 70015, blocks=525031, peer=1

....

Startup parameters:
-Datadir, which specifies the directory -conf, and -printtoconsole, which specifies the configuration file for console output
If you want to do background execution, you can add the -daemon parameter. At the same time, remove the -printtoConsole parameter and print it out in a later log file.


> bitcoind -datadir=/data/btc -conf=/root/.bitcoin/bitcoin.conf -daemon
Bitcoin server starting

# View the log, in the directory where the data is exported, to track the debug.log file.
> tail -f /data/btc/debug.log 
11-04-11 22:01:50' progress=0.001211 cache=23.8MiB(165438txo)
2018-05-30 04:21:12 UpdateTip: new best=00000000000044640cb1d3e034f8df6604d1ac1346e6162bfca8dc60c4bbd887 height=117873 version=0x00000001 log2_work=61.645341 tx=403428 date='2011-04-11 22:02:29' progress=0.001212 cache=23.8MiB(165441txo)
2018-05-30 04:21:12 UpdateTip: new best=0000000000006488914c16dc226f1d73d5dcd6c258c3bc926fa0f804909dbd1b height=117874 version=0x00000001 log2_work=61.645483 tx=403445 date='2011-04-11 22:19:06' progress=0.001212 cache=23.8MiB(165459txo)
2018-05-30 04:21:12 UpdateTip: new best=000000000000988f65c0d5b018241f0dd13ea6b73c6228efccbbb577b5791f06 height=117875 version=0x00000001 log2_work=61.645624 tx=403453 date='2011-04-11 22:21:40' progress=0.001212 cache=23.8MiB(165460txo)

...

Run the bitcoin-CLi GetBlockChainInfo command to display basic information about the status of bitcoin network nodes, wallets, and blockchain databases.


> bitcoin-cli getblockchaininfo
{
  "chain": "main",
  "blocks": 2867,
  "headers": 525050,
  "bestblockhash": "000000006d6af482c12555a44bed3a0d4bbadf0fa27274225a1ed808b8a7d405",
  "difficulty": 1,
  "mediantime": 1233666084,
  "verificationprogress": 8.75401245716694e-06,
  "initialblockdownload": true,
  "chainwork": "00000000000000000000000000000000000000000000000000000b340b340b34",
  "size_on_disk": 852350,
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": false
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "defined",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 0
    },
    "segwit": {
      "status": "defined",
      "startTime": 1479168000,
      "timeout": 1510704000,
      "since": 0
    }
  },
  "warnings": ""
}

When you see this information, it means that your Bitcoin application has started. There are dozens of gigabytes of data, need to be synchronized!
Bitcoin is a bit more complicated to install than APT, but according to the official documentation it should work properly and the installation process should not be a major problem for technicians. Different common chains, different node software, different installation methods, the next article will cover the ethereum client Geth installation.
Reprint please indicate the source:

bitcoin比特币节点安装


This entry was posted in digital currency

Git Pull Failed solution

Git Pull Failed solution
https://blog.csdn.net/zxl1033394132/article/details/50853013?utm_source=blogxgwz0
https://www.cnblogs.com/daiyanren/p/9615698.html
The git server has changed
. Fix: when the modified code is ready to submit the code, the code changed by others in the group needs to be merged in first

git stash;
git pull;
git stash pop;

Conflicts are displayed, and if there are conflicts, manually modify them, and then commit the code


The idea of operating
git stash


git pull

git stash pop;


Merge conflicts

Finally
git commit/push