When I am issuing any sudo wo command then I am getting the following error:
Traceback (most recent call last):
File "/usr/local/bin/wo", line 8, in <module>
sys.exit(main())
File "/opt/wo/lib/python3.8/site-packages/wo/cli/main.py", line 93, in main
with app:
File "/opt/wo/lib/python3.8/site-packages/cement/core/foundation.py", line 1501, in __enter__
self.setup()
File "/opt/wo/lib/python3.8/site-packages/cement/core/foundation.py", line 835, in setup
__import__(self._meta.bootstrap, globals(), locals(), [], 0)
File "/opt/wo/lib/python3.8/site-packages/wo/cli/bootstrap.py", line 7, in <module>
from wo.cli.controllers.base import WOBaseController
File "/opt/wo/lib/python3.8/site-packages/wo/cli/controllers/base.py", line 5, in <module>
from wo.core.variables import WOVar
File "/opt/wo/lib/python3.8/site-packages/wo/core/variables.py", line 13, in <module>
class WOVar():
File "/opt/wo/lib/python3.8/site-packages/wo/core/variables.py", line 67, in WOVar
config.read(os.path.expanduser("~") + '/.gitconfig')
File "/usr/lib/python3.8/configparser.py", line 697, in read
self._read(fp, filename)
File "/usr/lib/python3.8/configparser.py", line 1093, in _read
raise DuplicateOptionError(sectname, optname,
configparser.DuplicateOptionError: While reading from '/root/.gitconfig' [line 7]: option 'directory' in section 'safe' already exists
This started happening when I issued an wo command after a few weeks on the server and it asked for username and email address, When I provided the name and email, it threw an error and after that I am constantly gettign this error, here was the command and the outcome:
$wo -v
WordOps (wo) require an username & and an email address to configure Git (used to save server configurations)
Your informations will ONLY be stored locally
Enter your name: Unknown Guy
Enter your email: unknown@guy.com
Traceback (most recent call last):
File "/usr/local/bin/wo", line 8, in <module>
sys.exit(main())
File "/opt/wo/lib/python3.8/site-packages/wo/cli/main.py", line 93, in main
with app:
File "/opt/wo/lib/python3.8/site-packages/cement/core/foundation.py", line 1501, in enter
self.setup()
File "/opt/wo/lib/python3.8/site-packages/cement/core/foundation.py", line 835, in setup
import(self._meta.bootstrap, globals(), locals(), [], 0)
File "/opt/wo/lib/python3.8/site-packages/wo/cli/bootstrap.py", line 7, in <module>
from wo.cli.controllers.base import WOBaseController
File "/opt/wo/lib/python3.8/site-packages/wo/cli/controllers/base.py", line 5, in <module>
from wo.core.variables import WOVar
File "/opt/wo/lib/python3.8/site-packages/wo/core/variables.py", line 13, in <module>
class WOVar():
File "/opt/wo/lib/python3.8/site-packages/wo/core/variables.py", line 93, in WOVar
copy2(os.path.expanduser("~") + '/.gitconfig', '/root/.gitconfig')
File "/usr/lib/python3.8/shutil.py", line 435, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.8/shutil.py", line 264, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/root/.gitconfig'
$ wo -v
Traceback (most recent call last):
File "/usr/local/bin/wo", line 8, in <module>
sys.exit(main())
File "/opt/wo/lib/python3.8/site-packages/wo/cli/main.py", line 93, in main
with app:
File "/opt/wo/lib/python3.8/site-packages/cement/core/foundation.py", line 1501, in enter
self.setup()
File "/opt/wo/lib/python3.8/site-packages/cement/core/foundation.py", line 835, in setup
import(self._meta.bootstrap, globals(), locals(), [], 0)
File "/opt/wo/lib/python3.8/site-packages/wo/cli/bootstrap.py", line 7, in <module>
from wo.cli.controllers.base import WOBaseController
File "/opt/wo/lib/python3.8/site-packages/wo/cli/controllers/base.py", line 5, in <module>
from wo.core.variables import WOVar
File "/opt/wo/lib/python3.8/site-packages/wo/core/variables.py", line 13, in <module>
class WOVar():
File "/opt/wo/lib/python3.8/site-packages/wo/core/variables.py", line 93, in WOVar
copy2(os.path.expanduser("~") + '/.gitconfig', '/root/.gitconfig')
File "/usr/lib/python3.8/shutil.py", line 435, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.8/shutil.py", line 264, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/root/.gitconfig'
Has anyone faced this kind of error earlier, I have tried finding the solution here on forum and googled it as well but did not find any concrete solution. Please help