i'm starting to use puppet. i wanted to have my own yum repository to serve puppet server so i issued

 yum install createrepo

no errors reported (cenotos 5.5) after that i issued

createrepo /var/www/html/repository

but i get:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Traceback (most recent call last):
  File "/usr/share/createrepo/genpkgmetadata.py", line 724, in ?
  File "/usr/share/createrepo/genpkgmetadata.py", line 592, in main
    cmds, directories = parseArgs(args)
  File "/usr/share/createrepo/genpkgmetadata.py", line 431, in parseArgs
    cmds['basedir'] = os.getcwd()
 OSError: [Errno 2] No such file or directory

note the folder:



1 Answer 1


i found the problem os.getcwd() throws exception because as it turned the directory i was in was deleted by another process. all i needed to do was to change to a valid directory. interesting watson.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.