redmine_git_hosting icon indicating copy to clipboard operation
redmine_git_hosting copied to clipboard

access denied errors

Open levelos opened this issue 13 years ago • 2 comments

When using SSH protocol, I'm getting something along the lines of

W/R access for [repo name] DENIED to [redmine key name]

for any operation. Smart HTTP works great. I had this working and somewhere along the line it stopped and I'm completely stumped.

My configuration:

  • Ubuntu 11.04
  • Latest stable Chili
  • I've tried both the master branch of this repo and the @kubitron's (any ideas?).
  • My git user is gitolite and web user is www-data.
  • The owner of the gitolite admin repo is gitolite. E.g., I created a ssh key pair for the gitolite user after installing it and setup gitolite using that key, which I also copied to the chili root. I'm wondering if this is the part that's tripping me up.
  • All plugin settings look good, including sudo access.

Any guidance or help would be much appreciated!

levelos avatar Jan 23 '12 22:01 levelos

If you hadn't tried my version of the plugin, I might have thought that your config file was out of date with redmine/Chili. With my version of the plugin, have your tried executing a "fetch_changesets" and looked at the resulting log file? The error messages are much clearer and perhaps will show what problems are occurring... If there is something weird there, I would suggest posting it here.

For instance, it is possible that Chili cannot clone the gitolite-admin repository because your .ssh/keys at the root of Chili have the wrong ownership/permissions. (the .ssh directory should be 700 or 500. The private key inside should be 400, public key can be 444).

Another potential problem is if you happened to do a fetch_changesets from the command line using rake and were root at the time (instead of www-data). This can cause problems with synchronizing data; you might try running my version, removing the /tmp/redmine_git_hosting files and execute a fetch_changesets operation correctly. That usually fixes things...

Simple things to verify -- make sure that the ssh link that you are pushing to (look in the .git/config file) matches the one shown at the top of the repository page.... If you moved the project into being a child of another project, it is possible that the path changed.

Simple summary -- use my version and see what error messages pop up with fetch_changesets...

kubitron avatar Jan 24 '12 00:01 kubitron

Another potential problem is if you happened to do a fetch_changesets from the command line using rake and were root at the time (instead of www-data). This can cause problems with synchronizing data; you might try running my version, removing the /tmp/redmine_git_hosting files and execute a fetch_changesets operation correctly. That usually fixes things...

Thanks @kubitron. I think I did that at some point which may be my problem. I'm trying to run fetch_changesets() as www-data, but keep having various path not found issues (rake and ruby). Posted a similar question in your queue. Thanks.

levelos avatar Jan 25 '12 00:01 levelos