cpb- / yocto-cooker

Meta buildtool for Yocto Project based Linux embedded systems
GNU General Public License v2.0
43 stars 22 forks source link

Use a variable inside a menu #133

Closed frwol closed 1 year ago

frwol commented 1 year ago

Hi! I'm currently working on a project where I need a layer that is in a git repository that I can only access through HTTPS. I've got a token and I can clone the repository using a command like this :

git clone https://oauth2:<token>@git.url/project

The thing is I don't want to hard code the token inside the menu and I'd rather like to pass it as a variable. But my guess is that it's not possible with Yocto Cooker. So what would be the best way to handle this ? Thanks in advance for your help and advice.

pboettch commented 1 year ago

Git credentials should be stored with gitcredentials.

Cooker aims reproducibility, so having variables set via the environment or something is a show-stopper.

While there are some cases were variables might be useful, the SCM-configuration is none of them. Just to give an analogy, ssh-private-keys, if git is used with ssh, are not stored in the menu.

frwol commented 1 year ago

Hi @pboettch Thank you very much for your answer ! I'm going to look at git credentials. I'm closing this issue because it will likely solve my problem.

pboettch commented 1 year ago

You're welcome. Thank you for using/trying yocto-cooker.