Stanley Meng

OS: Ubuntu 20.04

While following RVM: Ruby Version Manager — Installing RVM to install RVM, got the following error:

curl: (77) error setting certificate verify locations:
CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs

I tried a few ways around, but didn’t fix. Finally this one works for me.

$ sudo apt reinstall ca-certificates
$ sudo update-ca-certificates

The second command is important. I ran the first command first, but the problem didn’t fix, so I thought ca-certificates package was fine. Then I went with other posts which kind of wasting lots of time.

Then, finally, I realized I have to run the second command too.



For instance, you have a parameter in the template:

"EnableWebServer": {
"Default": "No",
"Description": "Enable Web Server in the Ubuntu or not",
"Type": "String"

You want to pass it to the Shell Scripts in UserData to run some commands based on this parameter. Here is an sample:

"UserData": {
"Fn::Base64": {
"Fn::Join": [
"#!/bin/bash -xe\n",
"if [[ \"Yes\" == ",
"Ref": "EnableWebServer"
" ]]; then ",
"echo yes > /tmp/1.txt; ",
"else ",
"echo no > /tmp/1.txt;",



NOTE, it’s not permission error, that is another story!

This kind of issue could be all kind of reasons.

But, anyway, first of all, you should check the NFS version in your server and the client. Make sure you configure it based on the right version. Actually, the help info /etc/exports has this info, I quote

# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)

So, make sure you use the correct config format in the /etc/exports.

In my case, both client and server use V4. At beginning, I used

/srv/homes       hostname1(rw,sync,no_subtree_check)

it didn’t work.

I changed it to

/srv/homes       hostname1(rw,sync,fsid=0,crossmnt,no_subtree_check,no_root_squash)

Now it works.

Do NOT forget to restart the NFS server after you make any change in /etc/exports.

Have a good day.



Maybe I should consider github for this kind of document…uh…anyway, let me go with Medium.

  • How many files are modified in the local repo, but with only file name
git ls-files -m | wc -l
  • Compare files in different branches
git diff <branch name a>:<file path>  <branch name b>:<file path>For instance: git diff v9700:Shared/copy_coredumps.rb v9800:Shared/coredump_check/copy_coredumps.rb
  • Adds currently tracked files (which have been modified) to the staging area and also checks if they have been deleted (if yes, they are removed from staging area). NOTE it does not stage new files
git add -u
  • Delete Branch

local branch: git branch -d < branch name>
remote branch: git push origin --delete <branch name>
  • TBD