I was using capistrano for the deployment cap production deploy, the error message from capistrano
DEBUG [3730481e] fatal: unable to access './config': Permission denied
I found it's because the file permission lost.
the repo/config file permission 0664 before
-rw-rw-r-- 1 ec ec 217 Mar 1 12:08 config
after git remote set-url origin https://myawesometoken:@github.com/myawesomeusername/myawesomeproject.git
the repo/config file permission was lost, 0000
---------- 1 ec ec 217 Mar 1 12:09 config
[core]
repositoryformatversion = 0
filemode = true
bare = true
[remote "origin"]
url = https://myawesometoken:@github.com/myawesomeusername/myawesomeproject.git
fetch = +refs/*:refs/*
mirror = true