Reply to comment

Configuring Git to use Your SSH Keys

Github has instructions on how to do this.

Okay, you've done it, but it's still not working.

The problem I keep having is that I clone repos via HTTPS rather than git, so my settings need tweaking.

.git/config usually has a line like this:

[remote "origin"]
    url = https://github.com/johnkawakami/SitesForBernie.git
    fetch = +refs/heads/*:refs/remotes/origin/*

So, I need to change the URL, replacing the first part with "git@github.com:" I also like to add a setting for [push] to get rid of the long message.

[remote "origin"]
    url = git@github.com:johnkawakami/SitesForBernie.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[push]
    default=current

You can now issue a "git push" and it should work. If it doesn't, you probably don't have a key, and should follow the Github instructions.

Reply

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.

More information about formatting options

2 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.