-
Notifications
You must be signed in to change notification settings - Fork 13
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
GitHub authentication #80
Comments
When you say authenticating with GitHub, do you mean authenticating over |
Authenticating over |
Probably the most straight forward and secure way is to use an SSH keypair then. There's no limit to how many public keys you can upload to github, so it's probably best to generate a new keypair on typhon, and configure git to use SSH. That basically means, run To configure git to use the new ID, add somethign like this to your
Then, on all of your cloned repos, use
it would become
using the command git remote set-url origin "[email protected]:USER/REPO-NAME" Now you can push and pull from that repo securely. As an aside, I have here a script for automatically converting HTTPS urls into SSH ones. Works on ZSH, should work on Bash, just add to your sshremote() {
local remote="${1:-origin}"
local url="$(git remote get-url $remote)"
local alphanumeric="[a-zA-Z0-9\.]"
if [[ "$url" =~ ^$alphanumeric+://$alphanumeric+/(.*) ]]; then
local ext="${match[1]}"
local new="[email protected]:$ext"
git remote set-url "$remote" "$new"
echo "Updating $remote: '$url' -> '$new'"
else
echo "Malformed url: '$url'"
fi
} |
This works - thanks! |
Can anyone recommend good practice for securely authenticating with GitHub on the group's Linux system? I've looked at this article but the tools I use on my Mac are not installed (or I can't find) on the group's computers. Should I use a "personal access token" and if so, what's the safest way to do this? Thanks!
The text was updated successfully, but these errors were encountered: