I would like to remove my user name and personal access token from the package.json
file in my React application.
The package being installed is a private remote GitHub repository for which I am the owner.
The request is being made over the HTTPS protocol.
E.g: "react-trello": "https://username:token@github.com/username/react-trello.git#dev/branch"
I have a PAT issued from GitHub. But I'm having trouble accessing them in the package.json
file in my project.
Should I create Heroku config vars with the PAT value?
heroku config:set -a my-app GITHUB-TOKEN=466ghdf57
In Heroku config you can set variable names to use with GitHub. How do I set my user name, password and token? As Heroku config variables?
E.g: USERNAME
, GITHUB-USER
, TOKEN
, GITHUB-TOKEN
.
I've tried creating variables such as USERNAME
, TOKEN
, GITHUB_USER
. But it doesn't work if I remove my credentials from the package.json
file.
E.g: "react-trello": "https://github.com/username/react-trello.git#dev/branch"
.
I get an error: Fatal: Could not read Username for "https://github.com"
.
Am I missing something?