all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Butler <leo.butler@umanitoba.ca>
To: "Samuel Banya" <sbanya@fastmail.com>
Cc: Emanuel Berg <help-gnu-emacs@gnu.org>
Subject: Re: Issues With Trying To Use Magit Mode For GitHub Repos Via SSH Key
Date: Sun, 02 Jan 2022 18:25:13 -0600	[thread overview]
Message-ID: <87v8z1hdhy.fsf@t14.reltub.ca> (raw)
In-Reply-To: <5d4776dd-2e6a-47c7-82db-2cf3c4d46324@www.fastmail.com> (Samuel Banya's message of "Wed, 29 Dec 2021 12:23:38 -0500")

"Samuel Banya" <sbanya@fastmail.com> writes:

> ********************************************************
> Caution: This message was sent from outside the University of Manitoba.
> ********************************************************
>
> 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 '@github.com' --> example: I would put 'Tom' -->
> it would change to 'tom@github.com' for the username. This even
> occurred even if I used the email I have for my GitHub account,
> 'tom@mail.com' --> 'tom@mail.com@github.com'
> - 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 (id_rsa.pub)
> - 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 accordingly.
>
> 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://git@github.com:Tom/example.git

I don't think that url is right and that is causing your problem. My
config for a repo has

[remote "github"]
	url = ssh://github.com/leo-butler/with_gensyms.git
	fetch = +refs/heads/*:refs/remotes/github/*


>
> Also, I have this present in my ~/.ssh/config file as well:
> Host github.com
>   IdentitiesOnly yes
>   IdentityFile ~/.ssh/id_rsa.pub
>
> Any ideas on what I did wrong? 

I would make a special github key, but that is not causing your problem.

Leo



  reply	other threads:[~2022-01-03  0:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-29 17:23 Issues With Trying To Use Magit Mode For GitHub Repos Via SSH Key Samuel Banya
2022-01-03  0:25 ` Leo Butler [this message]
2022-01-06  0:25   ` Samuel Banya
2022-01-06  9:20     ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8z1hdhy.fsf@t14.reltub.ca \
    --to=leo.butler@umanitoba.ca \
    --cc=help-gnu-emacs@gnu.org \
    --cc=sbanya@fastmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.