Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rootfs/usr/local/bin/git-credential-github. Update rootfs/etc/init.d/atlantis.sh to use git-credential-github #476

Merged
merged 2 commits into from
May 18, 2019

Conversation

aknysh
Copy link
Member

@aknysh aknysh commented May 17, 2019

what

  • Add rootfs/usr/local/bin/git-credential-github
  • Update rootfs/etc/init.d/atlantis.sh to use git-credential-github

why

  • git-credential-github is useful for adding GitHub credentials to git to allow access to private GitHub repos
  • When the atlantis server starts, execute git-credential-github to configure git with atlantis user and GitHub token to allow access to private repos

references

…init.d/atlantis.sh` to use `git-credential-github`
@aknysh aknysh requested a review from osterman May 17, 2019 21:35
@aknysh aknysh self-assigned this May 17, 2019
# https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage
export GITHUB_USER=${ATLANTIS_GH_USER}
export GITHUB_TOKEN=${ATLANTIS_GH_TOKEN}
git config --global credential.helper 'github'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the name of the helper should be the script name, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the last part after git-credential-
https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage

osterman
osterman previously approved these changes May 17, 2019
@aknysh aknysh merged commit a8937c3 into master May 18, 2019
@aknysh aknysh deleted the add-git-credential-env branch May 18, 2019 02:24
leb4r pushed a commit that referenced this pull request Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants