Git Product home page Git Product logo

Comments (4)

jellyfish-bot avatar jellyfish-bot commented on May 25, 2024

[pdcastro] This issue has attached support thread https://jel.ly.fish/#/e82a4cc8-4367-4824-b37b-c81d8811b8cf

from train-departure-display.

pdcastro avatar pdcastro commented on May 25, 2024

The project's config.json file contains an API key (transportApi.apiKey) and it is not good practice to commit keys to git repositories, especially of course public ones. But removing the config.json line from the .gitignore file does require committing config.json to the repo: one could live with git status reporting "untracked files" for some time. Progress is being made on CLI issue balena-io/balena-cli/issues/1032, which will result in the CLI no longer considering the .gitignore file for what to push (looking at the .dockerignore file only). Once this CLI issue is resolved, the config.json line could be re-added to the .gitignore file.

from train-departure-display.

chrisys avatar chrisys commented on May 25, 2024

@pdcastro you got it, the config.json was added to .gitignore for the reason of not committing these private keys. I've always worked with setting the variables on the command line when developing in local mode for this project.

from train-departure-display.

pdcastro avatar pdcastro commented on May 25, 2024

I've always worked with setting the variables on the command line when developing in local mode for this project.

Thanks @chrisys. I gather that using a config.json file would similarly not work when pushing to the cloud, whether git push or balena push. So basically, at the moment (with config.json listed in the .gitignore file), it is not possible to use a config.json file with this project, whichever the push method or target.

The logic in the balena-run.sh script is that, if a config.json exists (currently "impossible"), it is used as is. If it doesn't exist, a config.json file is generated with the values from environment variables (whether the variables are set on the command line, or via the web dashboard). balena-run.sh runs on the device, not the development machine, so an auto-generated config.json file will exist on the device, not on the development machine.

I think it makes sense to remove config.json from .gitignore, which is not the same as requiring or recommending that users commit the file to some git repo (balena push does not require it). It is not even necessary to document the possibility of writing a config.json file. I am not proposing any changes to the Readme / documentation.

Then again, another option is to do nothing (in relation to this issue) and wait for CLI issue balena-io/balena-cli/issues/1032 to be resolved, at which point balena push will allow config.json to be pushed even if it is listed in the .gitignore file.

from train-departure-display.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.