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
Diary

.htaccess IP Control AWS ELB Load Balancer Environment

1 Mins read

Apache 2.4.39

[.htaccess] Or [httpd.conf]

# Set allowed IPs to 0.0.0.0
# AWS ELB admin screen access control
<location "/wp-admin">
  # Admin IP
  SetEnvIf X-Forwarded-For "0.0.0.0.*" allowed_ip_admin
  SetEnvIf X-Forwarded-For "0.0.0.0.*" allowed_ip_admin
  Order Deny,Allow
  Deny from all
  Allow from env=allowed_ip_admin
</location>

Read more
Diary

SMTP Server Configuration Checklist — Things to Watch When Email Won't Send

1 Mins read

Notes on things to watch

– Register the SMTP Server’s Global IP as an A host record in DNS
– Register SPF record in DNS
– Register DMARC record in DNS
– Register DKIM record in DNS (if needed—about 35% adoption as of June 2019)
MX, SPF and other mail server verification tools
DMARC record check tool

– For AWS, submit a request to remove SMTP sending restrictions
About removing AWS SMTP sending restrictions

To avoid being flagged as spam mail
– Set “Reply-to” in outgoing emails from your system

Read more
Diary

Requesting an Increase to AWS Elastic IP Usage Limit

1 Mins read

Received an error when attempting to add an Elastic IP.

The maximum number of addresses has been reached.

By default, Elastic IP has a limit of 5 addresses. You need to submit a request to increase this limit.
You’ll get a response in about 30 minutes.

Request link: Elastic IP request form
Important! Make sure you’re logged into AWS before clicking the link.

■When IP addresses are needed for a new service

Limit increase request 1
Service: Elastic IPs
Region: Asia Pacific (Tokyo)
Limit name: EC2-Classic Elastic IP address limit
Requested limit: 10
------------
Description of request reason: IP address is required to build a new service
Read more