{"thread":{"id":"22018","subject":"Fatal errors on git rm (Operation not permitted)","startedAt":"2009-12-23T18:01:02Z","lastAt":"2009-12-23T18:33:22Z","messageCount":2,"participants":["Xiaolong Tang","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"130286","messageId":"m2oclp36zl.wl%xiaolong.snake@gmail.com","threadId":"22018","inReplyTo":null,"subject":"Fatal errors on git rm (Operation not permitted)","fromName":"Xiaolong Tang","fromEmail":"xiaolong.snake@gmail.com","sentAt":"2009-12-23T18:01:02Z","receivedAt":"2009-12-23T18:01:02Z","isPatch":false,"sender":{"key":"xiaolong.snake@gmail.com","avatar":null},"body":"Hi all, \n\nI am running into a trouble with git commands. \n\nI have a repository in my laptop to keep all system settings. \nSpecifically, the repository is illustrated as below:\n \nreproot/\n.git\n.gitignore \n`-- lib\n    `-- emacs\n        `-- lisp\n            |-- dictionary\n            ...\n            |-- git-emacs \n            |   |-- ...\n            |   |-- ...\n            |   |-- ...\n            .. \n            |-- remember  \n\nTo ease the updating of these third-party Emacs packages (e.g. dictionary, git-emacs, remember and so on), I prefer to get them via version control commands. \nFor example, git-emacs is created via this command:\ngit://github.com/tsgates/git-emacs \n\nThis strategy seems to work well when I include (within my laptop repository) those packages which are not managed via git. \nOn the contrary, the trouble arises from including another git repository.\n\nFor example, when I try to clone my laptop repository into my desktop, the package \"git-emacs\" only shows up as an empty directory in the newly repository. \n\nThen when I go back to my laptop repository, there is nothing I can do.\nFinally, I decide to remove this package from my laptop repository, but end up with the following errors:\n\ngit rm -rf git-emacs\nrm 'lib/emacs/lisp/git-emacs'\nfatal: git rm: 'lib/emacs/lisp/git-emacs': Operation not permitted\n\nThe similar errors happen with removing remember(another package under git) too.\n11:53:37->git rm -rf remember\nrm 'lib/emacs/lisp/remember'\nfatal: git rm: 'lib/emacs/lisp/remember': Operation not permitted\n\nSo, below are my questions:\nWhat is the real cause of such kind of problem?\nHow could I fix it?\n\nPS: I did not use git submodule command.\n\nThanks!\nXiaolong\n"},{"id":"130288","messageId":"7v8wctr159.fsf@alter.siamese.dyndns.org","threadId":"22018","inReplyTo":"m2oclp36zl.wl%xiaolong.snake@gmail.com","subject":"Re: Fatal errors on git rm (Operation not permitted)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-12-23T18:33:22Z","receivedAt":"2009-12-23T18:33:22Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Xiaolong Tang <xiaolong.snake@gmail.com> writes:\n\n> Finally, I decide to remove this package from my laptop repository, but\n> end up with the following errors:\n>\n> git rm -rf git-emacs\n> rm 'lib/emacs/lisp/git-emacs'\n> fatal: git rm: 'lib/emacs/lisp/git-emacs': Operation not permitted\n\nWe don't say \"Operation not permitted\" ourselves; it is coming from your C\nlibrary's strerror(3) when we got EPERM error back.  The reason you get\nEPERM can vary depending on your platform and what you did to your\ndirectories yourself, but googling for \"Operation not permitted\" and\nrandomly reading a few might give you hints.\n"}]}