repo sync OSError: [Errno 13] Permission denied

xxxx@ubuntu:~/work$ repo sync
Traceback (most recent call last):
  File "/home/chenjy/git-repo/main.py", line 513, in <module>
    _Main(sys.argv[1:])
  File "/home/chenjy/git-repo/main.py", line 489, in _Main
    result = repo._Run(argv) or 0
  File "/home/chenjy/git-repo/main.py", line 162, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/chenjy/git-repo/subcmds/sync.py", line 624, in Execute
    rp.PreSync()
  File "/home/chenjy/git-repo/project.py", line 2770, in PreSync
    base = self.GetBranch(cb).merge
  File "/home/chenjy/git-repo/project.py", line 727, in GetBranch
    return self.config.GetBranch(name)
  File "/home/chenjy/git-repo/git_config.py", line 198, in GetBranch
    b = Branch(self, name)
  File "/home/chenjy/git-repo/git_config.py", line 677, in __init__
    self.merge = self._Get('merge')
  File "/home/chenjy/git-repo/git_config.py", line 720, in _Get
    return self._config.GetString(key, all_keys = all_keys)
  File "/home/chenjy/git-repo/git_config.py", line 129, in GetString
    v = self._cache[_key(name)]
  File "/home/chenjy/git-repo/git_config.py", line 246, in _cache
    self._cache_dict = self._Read()
  File "/home/chenjy/git-repo/git_config.py", line 253, in _Read
    self._SaveJson(d)
  File "/home/chenjy/git-repo/git_config.py", line 284, in _SaveJson
    os.remove(self._json)
OSError: [Errno 13] Permission denied: '/home/xxx/work/.repo/repo/.git/.repo_config.json'

解决:
chmod -R 777 ./repo/

上一篇:Python的报错笔记整理——(cmd下载)OSError: [E050] Can‘t find model ‘zh_core_web_sm‘


下一篇:OSError: image file is truncated (16 bytes not processed)