Diary

[GitHub] SSH Public Key Gets Deleted [git@github.com: Permission denied (publickey).]

1 Mins read

Github


$ ssh -T git@github.com
$ git@github.com: Permission denied (publickey).

Huh?

The .ssh directory itself looks fine.

Checked logs with

ssh -vT git@github.com

or

ssh -vvv git@github.com

Error traces point to the key.

Checked Github SSH Key on the web page.

It’s gone!

Turns out SSH public keys have an expiration date and get automatically deleted.

Recreated and set it up. Problem solved.

Read more
Diary

[Github] Repository Access Method Changed [remote: Support for password authentication was removed on August 13, 2021.]

1 Mins read

Github’s access method has changed.

「git push -u origin develop」

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.

Password authentication is now deprecated and replaced with access token method.

You need to log into Github on the web and create an access token.

1.Open the settings page( https://github.com/settings/tokens )
2.Click [Generate new token]
3.Enter an appropriate token name in the note field
4.Set permissions (need at least [repo] permission if modifying repositories)
5.Click [Generate token]
6.Save the generated token ★Important! Copy the token displayed here

★[repo] permission required to access repositories
★[workflows] permission required to update GitHub Actions
★Due to security constraints, token expiration can only be set up to max 360 days

git push -u origin develop
Username for 'https://github.com': hogehoge
Password for 'https://hogehoge@github.com':★

hogehoge = username
★ = token
You can now access with these credentials

Read more