Community Health Toolkit

Running Core CHT Framework GitHub Authentication

Continuing the discussion from Customizing and Running Core CHT Framework Coachdb:

Calling cht --url=https://medic:YOUR_PASSWORD@ --accept-self-signed-certs, requires GitHub authentication, and I get errors despite providing the correct Github username and security token as below:

Hey @oyierphil, do you have proper access to git repo? As in can you do git fetch from the same directory and it works?

That is to check whether your local repo is behind the remote repo. You can skip that check if you feel comfortable doing so by passing --skip-git-check.

1 Like

@oyierphil I’d like to echo @Nick’s suggestion.

@Nick he has access to the repo but given it’s private, git needs to authenticate.

@oyierphil alternatively, ensure you’ve authenticated to github as outlined in these steps (to ensue your authentication session persists)

$ git config credential.helper store
$ git pull

Username for '': <USERNAME>
Password for '': <PASSWORD>
1 Like

Derick, please share the command for updating the container before loading the forms, trying to reload the code after edit, thank you

Good evening
Made some changes on the forms after successfully running and created my own Githut repo for ease of testing, forgot the last comma

nd we did to update the container and overcome the last error attached, seem not ti find online, please assist

Add the following to your cht command to bypass the warnings

cht --url=https://some-url -- --debug 


-- --debug

Hi Derick
A strange error today, someone was updating the domain and interfered with the app,trying to load afresh, we have a meeting at 1 pm

Are you running your commands as root?

Does your user (if not running as root) have read/write access to /tmp/nools.js. Do you get unblocked if you delete /tmp/nools.js?

As you noticed last time, running the commands as root can trip you up.

We have managed, thank you very much.
I didn’t update the container, good afternoon

@oyierphil are you able to share what worked for you or mark one of the responses as a solution?

Yes I will tomorrow.
Tried to configure another VM to test the revised CIF form and I get errors as attached, will sort out this tomorrow. I see part of the problem is the revised questions, will appreciate any suggestions
I did ran the command cht --url=https://username:password@ – --debug but they didn’t go

I’m unable to reproduce the warnings on your second screenshot.

 npx medic-conf --url=https://my-url compile-app-settings
INFO Processing config in config-covid-moh-ke. 
INFO Actions:
     - compile-app-settings 
INFO Starting action: compile-app-settings… 
INFO Packaging contact-summary 
INFO Hash: f91d952c8205d65a1995
Version: webpack 4.43.0
    Hash: f91d952c8205d65a1995
    Time: 574ms
    Built at: 10/05/2021 11:20:20 AM
                   Asset      Size  Chunks             Chunk Names
    ./contact-summary.js  5.02 KiB       0  [emitted]  main
    Entrypoint main = ./contact-summary.js
    [0] ./node_modules/medic-conf/src/contact-summary/lib.js 203 bytes {0} [built]
    [1] ./contact-summary.templated.js 3.11 KiB {0} [built]
    [2] ./node_modules/medic-conf/src/contact-summary/contact-summary-emitter.js 3.23 KiB {0} [built] 
INFO Packaging nools 
INFO Hash: ad6b9325630c0baf0cce
Version: webpack 4.43.0
    Hash: ad6b9325630c0baf0cce
    Time: 150ms
    Built at: 10/05/2021 11:20:21 AM
         Asset      Size  Chunks             Chunk Names
    ./nools.js  4.67 KiB       0  [emitted]  main
    Entrypoint main = ./nools.js
    [0] ./node_modules/medic-conf/src/nools/definition-preparation.js 1.36 KiB {0} [built]
    [1] ./node_modules/medic-conf/src/nools/lib.js 328 bytes {0} [built]
    [2] ./tasks.js 21 bytes {0} [built]
    [3] ./targets.js 24 bytes {0} [built]
    [4] ./node_modules/medic-conf/src/nools/task-emitter.js 4.73 KiB {0} [built]
    [5] ./node_modules/medic-conf/src/nools/target-emitter.js 2.75 KiB {0} [built] 
INFO compile-app-settings complete. 

Do you have more detailed output that you can attach here?

Also, please ensure you do not share any credentials for any servers reachable on the internet.

We have finalized making the changes on the forms and wanted to test, getting the error below when running the commands:

@oyierphil please run npm ci on the appliction code folder and rerun your command.

Hi Derick
We ran the command and updated all dependencies using npm ci. We have an error on 'Unknown question type ‘db:trace_contact’. ’
We tried to review the other forms and noted the db:trace_contact type isnt clear how its used, please review and advise as below:

Execute ‘./’ from the application code folder and the rerun your previous command.

Running and still getting errors as below:

Replace the underscore with a hyphen. Sorry I’m not Infront of a computer. It’s the only she’ll script in the folder as per your screenshot

Hey @oyierphil, how did it go?

Hi Derick, now sorting out errors with the revised XLSForms, updating in a short while