subuser-security / subuser

Run programs on linux with selectively restricted permissions.
http://subuser.org
GNU Lesser General Public License v3.0
890 stars 65 forks source link

Unable to start subuser, with either stable or the git version #277

Closed csterritt closed 8 years ago

csterritt commented 8 years ago

Hi -- trying to try out subuser on a Ubuntu 14.04.3 machine.

The install works fine either way, but when I try to run subuser list available I see:

$ subuser list available
Traceback (most recent call last):
  File "/usr/local/bin/subuser-list.py", line 139, in <module>
    list(sys.argv[1:])
  File "/usr/local/bin/subuser-list.py", line 60, in list
    reposToList = user.getRegistry().getRepositories().keys()
  File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/registry.py", line 52, in getRepositories
    self.__repositories = repositories.Repositories(self.getUser())
  File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/repositories.py", line 28, in __init__
    self.reloadRepositoryLists()
  File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/repositories.py", line 50, in reloadRepositoryLists
    repositoryStates = self._loadRepositoryStates()
  File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/repositories.py", line 91, in _loadRepositoryStates
    if "repository-states.json" in gitFileStructure.lsFiles("./"):
  File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/gitRepository.py", line 194, in lsFiles
    return list(set(self.ls(subfolder)) - set(self.lsFolders(subfolder)))
  File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/gitRepository.py", line 177, in ls
    items = self.lsTree(subfolder,extraArgs)
  File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/gitRepository.py", line 154, in lsTree
    (returncode,output) = self.getRepository().runCollectOutput(["ls-tree"]+args)
  File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/gitRepository.py", line 62, in runCollectOutput
    raise Exception(stderr)
Exception: fatal: Not a valid object name master

What am I doing wrong? thanks!

timthelion commented 8 years ago

Hi,

Did you not have git settup the first time you ran subuser? If it fails to initialize, then it can get into a weird state where it will not run properly. In any case, the solution should be deleting your ~/.subuser directory and trying again. However, I should fix this so that it doesn't crash in such an ugly way.

Tim

On 02/18/16 00:22, csterritt wrote:

Hi -- trying to try out subuser on a Ubuntu 14.04.3 machine.

The install works fine either way, but when I try to run |subuser list available| I see:

|$ subuser list available Traceback (most recent call last): File "/usr/local/bin/subuser-list.py", line 139, in list(sys.argv[1:]) File "/usr/local/bin/subuser-list.py", line 60, in list reposToList = user.getRegistry().getRepositories().keys() File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/registry.py", line 52, in getRepositories self.repositories = repositories.Repositories(self.getUser()) File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/repositories.py", line 28, in __init self.reloadRepositoryLists() File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/repositories.py", line 50, in reloadRepositoryLists repositoryStates = self._loadRepositoryStates() File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/repositories.py", line 91, in _loadRepositoryStates if "repository-states.json" in gitFileStructure.lsFiles("./"): File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/gitRepository.py", line 194, in lsFiles return list(set(self.ls(subfolder)) - set(self.lsFolders(subfolder))) File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/gitRepository.py", line 177, in ls items = self.lsTree(subfolder,extraArgs) File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/gitRepository.py", line 154, in lsTree (returncode,output) = self.getRepository().runCollectOutput(["ls-tree"]+args) File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/gitRepository.py", line 62, in runCollectOutput raise Exception(stderr) Exception: fatal: Not a valid object name master |

What am I doing wrong? thanks!

— Reply to this email directly or view it on GitHub https://github.com/subuser-security/subuser/issues/277.

timthelion commented 8 years ago

I just pushed a fix that might make it so that subuser is somewhat more inteligent about this situation...

On 02/18/16 00:22, csterritt wrote:

Hi -- trying to try out subuser on a Ubuntu 14.04.3 machine.

The install works fine either way, but when I try to run |subuser list available| I see:

|$ subuser list available Traceback (most recent call last): File "/usr/local/bin/subuser-list.py", line 139, in list(sys.argv[1:]) File "/usr/local/bin/subuser-list.py", line 60, in list reposToList = user.getRegistry().getRepositories().keys() File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/registry.py", line 52, in getRepositories self.repositories = repositories.Repositories(self.getUser()) File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/repositories.py", line 28, in __init self.reloadRepositoryLists() File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/repositories.py", line 50, in reloadRepositoryLists repositoryStates = self._loadRepositoryStates() File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/repositories.py", line 91, in _loadRepositoryStates if "repository-states.json" in gitFileStructure.lsFiles("./"): File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/gitRepository.py", line 194, in lsFiles return list(set(self.ls(subfolder)) - set(self.lsFolders(subfolder))) File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/gitRepository.py", line 177, in ls items = self.lsTree(subfolder,extraArgs) File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/gitRepository.py", line 154, in lsTree (returncode,output) = self.getRepository().runCollectOutput(["ls-tree"]+args) File "/usr/local/lib/python3.4/dist-packages/subuserlib/classes/gitRepository.py", line 62, in runCollectOutput raise Exception(stderr) Exception: fatal: Not a valid object name master |

What am I doing wrong? thanks!

— Reply to this email directly or view it on GitHub https://github.com/subuser-security/subuser/issues/277.

csterritt commented 8 years ago

Oooh, did the rm -rf .subuser, then a subuser list available worked perfectly! Thanks!