Skip to content

Instantly share code, notes, and snippets.

@joeangel
Created August 10, 2017 09:20
Show Gist options
  • Save joeangel/3e9b57fa7cd76b3ba00dd15db8a71fdd to your computer and use it in GitHub Desktop.
Save joeangel/3e9b57fa7cd76b3ba00dd15db8a71fdd to your computer and use it in GitHub Desktop.

在 AWS, GZCP 使用 git 的注意地方

AWS

  • 因為登入後的帳號都是 ubuntu,所以要 sudo su 切換成 root 操作,並且 ssh public/private key 要用 root 產生。
  • sudo chown -R root: .git/ .gitingore
  • 不能用 sudo git push 下指令會吃到 ubuntu 使用者的設定

GCP

  • 直接用自己的 user 產生 public/private key
  • sudo chown -R root: .git/ .gitingore
  • 可以用 sudo git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment