[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issues With Trying To Use Magit Mode For GitHub Repos Via SSH Key

From: Samuel Banya
Subject: Issues With Trying To Use Magit Mode For GitHub Repos Via SSH Key
Date: Wed, 29 Dec 2021 12:23:38 -0500
User-agent: Cyrus-JMAP/3.5.0-alpha0-4525-g8883000b21-fm-20211221.001-g8883000b

Hey there,

I'm trying to move all my personal Git repos back to GitHub.

I am having a difficult time doing so since I'm getting some weird side effects 
of either Git or Magit Mode acting weird.

Here's what I did:
- I made a single repo on my GitHub that's blank
- I then cloned the repo locally on my machine
- I then added the contents of the older repo (minus the '.git' directory) to 
the the cloned directory
- I then added all of the new folders and files to that particular repo via 
'Magit' mode in Emacs
- I then attempted to push a commit to that new GitHub repo
- I was then prompted for a 'Username' and 'Password', which kept defaulting to 
using '' --> example: I would put 'Tom' --> it would change to 
'' for the username. This even occurred even if I used the email 
I have for my GitHub account, '' --> ''
- I did some research and apparently GitHub changed their authentication 
methods to force either a Personal Access Token or through an SSH key
- So, I simply added my SSH key to my GitHub account, specifically the 'public' 
key (
- However I'm getting the same weird results as above

I believe I have to modify the .git/config'* *file so that the 'url' is changed 

However, I'm a bit confused on actually WHAT to put in there.

Here's an example (not the actual line I used):
url = ssh://

Also, I have this present in my ~/.ssh/config file as well:
  IdentitiesOnly yes
  IdentityFile ~/.ssh/

Any ideas on what I did wrong? 

The only thing I can think of is that I made a blank GitHub repo to begin with, 
so my workflow is probably messed up as a result.

Any reference links would be cool too since I haven't used GitHub in ages in 
comparison so I have no idea how to approach this.

Just wanted to push my git repos to GitHub quickly.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]