Giter Site home page Giter Site logo

Comments (4)

ytti avatar ytti commented on June 6, 2024

Agreed. Do you have crashfile for this, so we can see the call stack.

Which rugged version are you running (gem list|grep rugged).

from oxidized.

ytti avatar ytti commented on June 6, 2024

I get this error on debug:

Failed to make directory '/home/ytti/.config/oxidized/oxidized.git/objects': Permission denied
/var/lib/gems/2.1.0/gems/oxidized-0.3.0/lib/oxidized/output/git.rb:75:in `init_at': Failed to make     directory '/home/ytti/.config/oxidized/oxidized.git/objects': Permission denied (Rugged::OSError)

Without debug:
Failed to make directory '/home/ytti/.config/oxidized/oxidized.git/objects': Permission denied

Which I think is good enough.
[[email protected] ~/.config/oxidized]% gem list|grep -i rugged
rugged (0.21.0)

I tested by doing
'sudo chown root oxidized.git'

Can you repro your bad warning message on 0.21.0, if so, how?

from oxidized.

will-h avatar will-h commented on June 6, 2024

Debugging some more. I've found if the repo already exists but is owned by another user it fails with this error. I did this by backupping my current directory; chown -R will * on the respository.

rugged (0.21.2) here.

2015-02-22 10:40:42 UTC
wrong argument type Rugged::Repository (expected String) [TypeError]
--------------------------------------------------
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/output/git.rb:36:in `init_at'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/output/git.rb:36:in `rescue in store'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/output/git.rb:32:in `store'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/worker.rb:37:in `process'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/worker.rb:13:in `block in work'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/worker.rb:13:in `each'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/worker.rb:13:in `work'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/core.rb:36:in `run'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/core.rb:29:in `initialize'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/core.rb:11:in `new'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/core.rb:11:in `new'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/lib/oxidized/cli.rb:9:in `run'
/var/lib/gems/1.9.1/gems/oxidized-0.2.3/bin/oxidized:9:in `<top (required)>'
/usr/local/bin/oxidized:23:in `load'
/usr/local/bin/oxidized:23:in `<main>'
--------------------------------------------------

from oxidized.

ytti avatar ytti commented on June 6, 2024

In my test

  1. having repo owned by another user => reasonable error message
  2. having write to repo AND read to repo/config but NOT to other files => unreasonable error message

After change:

[[email protected] ~/.config/oxidized]% sudo chown root oxidized.git 
[[email protected] ~/.config/oxidized]% oxidized 
first 'Could not find repository from '/home/ytti/.config/oxidized/oxidized.git'' was raised while opening git repo, then 'Failed to make directory '/home/ytti/.config/oxidized/oxidized.git/objects': Permission denied' was while trying to create git repo
[[email protected] ~/.config/oxidized]% sudo chown ytti oxidized.git 
[[email protected] ~/.config/oxidized]% cd oxidized.git 
[[email protected] ~/.config/oxidized/oxidized.git]% sudo chown root *
[[email protected] ~/.config/oxidized/oxidized.git]% oxidized 
first 'Could not open '/home/ytti/.config/oxidized/oxidized.git/config': Permission denied' was raised while opening git repo, then 'Could not open '/home/ytti/.config/oxidized/oxidized.git/config': Permission denied' was while trying to create git repo
[[email protected] ~/.config/oxidized/oxidized.git]% sudo chown ytti config
[[email protected] ~/.config/oxidized/oxidized.git]% oxidized              
first 'Failed to create temporary file '/home/ytti/.config/oxidized/oxidized.git/objects/tmp_object_git2_Jwk9Fu': Permission denied' was raised while opening git repo, then 'wrong argument type Rugged::Repository (expected String)' was while trying to create git repo
[[email protected] ~/.config/oxidized/oxidized.git]% 

from oxidized.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.