foundry_dev_tools.cli.git_credential_foundry module

foundry_dev_tools.cli.git_credential_foundry module#

A git credential helper.

This credential helper does authenticate you to the Foundry Git server with the token from the Foundry DevTools config. This allows you to use e.g. OAuth and removes the need to clone repositories with the token in the URL. If you still include the token in the clone URL, git will prefer these over using this credential helper and will store your credentials in the .git directory of the repository.

Run the command git-credential-foundry in the command line and it will output the configuration you need to add to your git config. (You’ll need a valid Foundry DevTools credentials configuration.)

Example output:

To use this helper, add the following to your git config:

[credential "https://example.com"]
  helper =
  helper = "/path/to/bin/git-credential-foundry"

Or run the following commands:
git config --global credential."https://example.com".helper ""
git config --global --add credential."https://example.com".helper "/path/to/bin/git-credential-foundry"

But below is the generic way to use it (replace the URL with your Foundry stack URL), which assumes that git-credential-foundry is in your PATH.

Generic Instructions:

Can be used by adding the following to your git config:

[credential "https://your-stack.palantirfoundry.com"]
      helper =
      helper = foundry

(Git automatically adds git-credential- in front of the helper name, that’s why we only add “foundry” here)

Or executing the commands:

git config --global credential."https://your-stack.palantirfoundry.com".helper ""
git config --global --add credential."https://your-stack.palantirfoundry.com".helper "foundry"