# Cert issuer and cannot connect to Bitcoin Service Provider

**URL:** <https://community.blockcerts.org/t/cert-issuer-and-cannot-connect-to-bitcoin-service-provider/574>\
**Category:** Support\
**Created:** [November 25, 2017, 12:27am UTC](https://community.blockcerts.org/t/cert-issuer-and-cannot-connect-to-bitcoin-service-provider/574 "2017-11-25T00:27:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jake666](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/jake666/32/258_2.png) [@jake666](https://community.blockcerts.org/u/jake666)\
**Post date:** [November 25, 2017, 12:27am UTC](https://community.blockcerts.org/t/cert-issuer-and-cannot-connect-to-bitcoin-service-provider/574/1 "2017-11-25T00:27:42Z")

</div>

Hi guys,

I am trying to run cert\_issuer using the bitcoin testnet.

I edited conf\_regtest with my testnet public key and have run the below command, however I get an error saying I cannot connect to the Bitcoin Service Provider? Any idea how I can fix this?

Thanks.

**Run Cert\_Issuer**  
python cert\_issuer -c conf\_regtest.ini

**Connection Error**  
`ImportError: cannot import name BitcoinServiceProviderConnector`

---

<div class="post-metadata">

**Author:** ![jake666](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/jake666/32/258_2.png) [@jake666](https://community.blockcerts.org/u/jake666)\
**Post date:** [November 25, 2017, 2:44pm UTC](https://community.blockcerts.org/t/cert-issuer-and-cannot-connect-to-bitcoin-service-provider/574/2 "2017-11-25T14:44:11Z")

</div>

A solution that helped me get the cert-issuer to work were the below steps. I am a beginner in programming, so I am sure there is a better way to solve this, but this seemed to work.

**Steps to Issue Certificates**

1. Make sure python3 is used
2. Run pip3 install -r requirements.txt (I have to use pip3 as pip is for v2.7 on my machine)
3. Copy issue\_certificates.py and paste in the directory above. If I ran issue\_certificates.py in the original location, I get the error ‘cannot import bitcoin.rpc’. Not sure why this is but this solution seems to help
4. Get a bitcoin tesnet address from [https://bitcoinpaperwallet.com/bitcoinpaperwallet/generate-wallet.html?design=alt-testnet](https://bitcoinpaperwallet.com/bitcoinpaperwallet/generate-wallet.html?design=alt-testnet) . This will give you a public and a private key
5. Get testnet coins from [https://testnet.manu.backend.hamburg/faucet](https://testnet.manu.backend.hamburg/faucet) and send them to your public key (you need to wait for confirmations to go through to receive the funds, this took over an hour for me)
6. Copy config\_regtest.ini and rename it to config.ini. Add in the testnet bitcoin public address and use chain=bitcoin\_testnet and change bitcoind=False
7. Make a new file pk.txt and copy the private key directly into the file and edit the conf.ini file to contain  
key\_file=pk.txt and usb\_home = 
8. Copy some unsigned certificates into the director \data\unsigned\_certificates
9. Run ‘python3 issue\_certificates.py’

---

<div class="post-metadata">

**Author:** ![kim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/kim/32/307_2.png) [@kim](https://community.blockcerts.org/u/kim)\
**Post date:** [November 26, 2017, 2:00am UTC](https://community.blockcerts.org/t/cert-issuer-and-cannot-connect-to-bitcoin-service-provider/574/3 "2017-11-26T02:00:31Z")

</div>

Thanks for posting the resolution @jake666!  
– Kim

---

<div class="post-metadata">

**Author:** ![Julian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/julian/32/446_2.png) [@Julian](https://community.blockcerts.org/u/Julian)\
**Post date:** [May 25, 2018, 4:31pm UTC](https://community.blockcerts.org/t/cert-issuer-and-cannot-connect-to-bitcoin-service-provider/574/4 "2018-05-25T16:31:29Z")

</div>

Hi Jacke! And Kim!  
I went through the Cert-Issuer tutorial, and I managed to issue certificates using the docker image in regtest.  
But Im having a rough time starting with Testnet, do you have any suggestion?  
Im thinking about following this tutorial, but I have a few questions:  
3. What do you mean with “in the directory above” the python directory or the cert-issuer?  
6. Copy the config\_regtest.ini and paste it where?  
7. Can I have the pk.txt in my hard drive or does it have to be in a USB drive always?  
Thanks in advanced for all the help!
