其他分享
首页 > 其他分享> > repo sync OSError: [Errno 13] Permission denied

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/

标签:13,git,chenjy,Permission,py,repo,OSError,home,line
来源: https://blog.csdn.net/qq_42292556/article/details/119250524