Creating an enviroment in a different github account

By default, environments seem to be created in my personal github account floxmeta repository. However, I would like to be able to create and share environments in a corporate github.com account as well, so that I can keep it private and also share it with co-workers.

Is this possible today, and if so, how?

Hi @zell - thanks for asking!

We definitely need to improve the documentation around this aspect of flox configuration, but rest assured that flox was born in an enterprise setting so we completely understand the need for it to be configurable at the package, machine, individual, and environment-specific levels.

The package level

The flox package is built with its own configuration defaults, and you can see those with the following command:[1]

$ cat $(flox --bash-passthru --prefix)/etc/flox.toml
# Package-specific defaults here.
# Company-specific defaults in /etc/flox.toml.
# User-specific overrides in ~/.floxrc.

[floxpkgs]

    gitBaseURL = "https://github.com/"

$ flox pull -e some-owner/some-environment

confirm git URL for storing profile metadata: https://github.com/some-owner/floxmeta

As you can see there is only one “package” level default, which is the gitBaseURL parameter. We anticipate building custom versions of the flox installers for companies that would like versions with their configuration defaults “baked in”.

The machine level

Administrators can also impose system-wide defaults by way of the /etc/flox.toml file. Values in this file will override the package defaults.[1:1]

$ cat /etc/flox.toml
[floxpkgs]

    gitBaseURL = "https://github.floxdev.com/"

$ flox pull -e some-owner/some-environment

confirm git URL for storing profile metadata: https://github.floxdev.com/some-owner/floxmeta

The individual level

Individuals can also configure their own personal default gitBaseURL, and this value will override the one(s) provided as machine and package defaults. This is done by way of the flox config command:[1:2]

$ flox --bash-passthru config --set gitBaseURL https://github.mycompany.com/
channels = "{}"
educatePublish = "1"
floxClientUUID = "7cc96fb2-adeb-11ed-ae86-ffa1e0378296"
gitBaseURL = "https://github.mycompany.com/"

$ flox pull -e some-owner/some-environment

confirm git URL for storing profile metadata: https://github.mycompany.com/some-owner/floxmeta

The environment level

Finally, you’ll recall as you first flox push or flox pull an environment you are prompted to confirm the URL where flox expects to find the metadata, and you can override this default to point it wherever you like, e.g.:

$ flox pull -e some-owner/some-environment

confirm git URL for storing profile metadata: https://github.com/some-owner/floxmeta

In the above prompt, simply change the URL to be whatever you like. (The URL doesn’t even need to end in /floxmeta, but we strongly recommend you use that as the repository name.) If the server you provide has the “github” string in it then flox will attempt to manage authentication and access for you by way of the gh CLI, and if you provide some other valid git URL then you’ll need to create the repository and configure your own ssh keys / access.

We need you!

We recognize that this is an area where variations in corporate environments will present a never-ending stream of challenges, and that we have a lot of work ahead of us improving the user experience around the use of non-Github repositories. To really get this right we will need all the feedback we can get, so if you would like to work with us to configure flox for your environment please get in touch by signing up for the enterprise beta or emailing Robin at rtb@floxdev.com.

Again, many thanks for the feedback!


  1. please disregard the use of --bash-passthru in the following command. This is required today on account of a bug in our new (rust) CLI, but we’re working to get a fix out for that ASAP. I’ll circle back to remove that flag from the invocation once the updated version is available for use. ↩︎ ↩︎ ↩︎

1 Like

Hi, I just registered for the enterprise beta.
I would like to work on the configuration things with you.
Cheers
Michael

Hi @malagant - excellent news, thank you for getting in touch!
I see your registration for the enterprise beta. :hugs:
I will send you an email shortly re your interest in working with us on it. :+1: