Tuesday, December 29, 2020

github will cease support using username/password for login

Github will stop supporting username/password for accessing:
Basic authentication using a password to Git is deprecated and will soon no longer work. 
Visit https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more
 information around suggested workarounds and removal dates.
Beginning August 13, 2021, we will no longer accept account passwords when authenticating Git operations
 on GitHub.com. For developers, if you are using a password to authenticate Git operations with GitHub.com
 today, you must begin using a personal access token over HTTPS (recommended) or SSH key by August 13, 
2021, to avoid disruption.
I'm not very familiar with how the token can be used. I assume that is for HTTPS. As I know, for daily pull/
push, SSH key is commonly used. You can follow instruction to generate the RSA key pair, and upload the
public key to Github.  If run into issue, refer to troubleshoot common SSH Problems, especially
Reviewing your SSH keys
If run 'ssh-add -l -E sha256' gives 'The agent has no identities', probably you haven't run ssh-add to add the
 key to ssh-agent. You can run: ssh-add -E sha256, then rerun with '-l'. 
For your exist local repository, may need update the remote url as this:
Check remote url: git remote -v
Update remote url: git remote set-url origin git@github.com:your_github_username/your_proj.git
Note, it is 'git@' but not 'your_username@'.

Tuesday, December 8, 2020

Chicken & egg: Google Account Verify code via SMS

 Recently Google announced policy update which mentioned an email account may get deactivated if not used for a long time. I had registered an email address with a personal name and I don't want to lose it. But I haven't used it for a while since my previous old computer retired. So I tried to log into the account with my new computer. The password still works. Everything looks OK, until when I tried to add the account to my Thunderbird email app, it redirected me to Google website and asked for 6 digital verification code which supposed to be sent to my phone as text message (SMS). However, for some reason, I cannot get the code no matter how many times I tried. It worked before, that's how the phone number got bound with my Gmail account. I got to Google Account management site and did see besides the phone number, I have recovery email and secret question set as recovery method. But, when I trying to change or remove the phone, it prompted me again with code sending to my phone.

Select "More way to verify" doesn't help, it will always go back to the same page: get a verification code with the phone text message. I googled, and found others encountering the same problem, with no solution. Yes, I tried recovery Google Account. Since I have the right current password, it always says recovery success. But, I still cannot get the code, and I cannot change the phone number, and it does not prompt for other way such as phone call as verify method. It's so frustrate, and eventually, I saw this page from Google's FAQ at https://support.google.com/accounts/answer/183723?hl=en&ref_topic=3382296:

Can't change recovery info

If there’s something different about how you’re signing in, you might not have the option to change your recovery info. You can try again:

  • From a device you normally use to sign in.
  • From a location where you normally sign in.
  • The following week from the device that you’re currently using.

So my best luck is: try after a week, with same computer. Hopefully it will work.

Update: I was able to update the setting after couple days later.