Bitcoin-cli getnewaddress - Urgent

Can anyone help me on how to run these commands ?

issuer=bitcoin-cli getnewaddress
sed -i.bak “s//$issuer/g” /etc/cert-issuer/conf.ini
bitcoin-cli dumpprivkey $issuer > /etc/cert-issuer/pk_issuer.txt

correct me if I’m wrong. I suppose to run them here right ?

But when I run those command


What am I suppose to do ?
I’m so lost .

You’re getting there! Those three commands did the following:

  1. Created a new Bitcoin address and assigned it to the shell variable called issuer.
  2. Opened the file /etc/cert-issuer/conf.ini and replaced the string <issuing-address> with the value in the issuer shell variable.
  3. Emitted the private key associated to the Bitcoin address into a text file called /etc/cert-issuer/pk_issuer.txt.

If you look at the contents of the conf.ini file, you should see that it has a Bitcoin address in it, up towards the top. You may do this by running a command like the following:

cat /etc/cert-issuer/conf.ini.

From there, if you’re working through the Quick Start, you’ll jump immediately into the next section of that document, titled “Issuing Certificates.” That will take you through the step of copying the example unsigned certificate into the appropriate location in the file system, generating some fake coinage, sending it to your issuing address, and finally, running cert-issuer. In regtest mode, this will result in a signed copy of the input certificate being written to output directory (in this case, /etc/cert-issuer/data/blockchain_certificates).

When you finish these steps, you will have a signed certificate, though it will not yet be on the Bitcoin blockchain. When you’re ready to try a testnet issuance, you’ll need to make a couple of changes to the /etc/cert-issuer/conf.ini file, changing the network to bitcoin_testnet and probably commenting out the line that says bitcoind, if it exists. The README has more information about testnet and mainnet issuance, if you read it from the “Create a Bitcoin issuing address” subheading onwards.

1 Like

Hey @lparker thanks for your time in giving such a detailed explanation. But I do stuck at the beginning. I can’t find the directory /etc/cert-issuer/conf.ini . Where did I do the mistake ?

Have you installed the cert-issuer from docker ? If yes, the directories would’ve been automatically created. If no, then u need to make directories using mkdir command. some of the directories might be hidden so give try by using “ls -a” command. Happy coding…

Hello ,
Can you please elaborate it , what will be the information in conf.ini file in cert-issuer directories . If i will use mkdir command then it will create blank directory .How can i get conf.ini file in cert-issuer directories ?
OS - Windows