WebFaction
Community site: login faq

I'm working with setting up a remote Git repository via my WebFaction account and am having difficulties managing multiple users.

I've been following the Git reference instructions and have set up the htpasswd file as suggested. However, I'm still having difficulties cloning, pushing, and pulling from the remote repository via any account other than my default WebFaction control panel account.

Here's how I've been trying to do this thus far. Please let me know if I'm misunderstanding something crucial about how this should work:

• I added the user password via htpasswd like this: htpasswd .htpasswd otheruser and have confirmed that the new password is correctly added to the Git application's .htpasswd file.

• I created a new folder on the local computer and attempted to clone the remote WebFaction repository via SSH using the following command (edited to obscure account information): git clone otheruser@myaccount.webfactional.com:webapps/git/repos/myrepository.git

• I'm then prompted for the password I created for the otheruser account via htpasswd and enter it.

• This invariably fails with the following message: fatal: otheruser@myaccount.webfactional.com:webapps/git/repos/myrepository.git/info/refs not found: did you run git update-server-info on the server?

This is confusing because I know the repository and file structure exist properly on the WebFaction server since I have no trouble performing common Git actions via my default user account. My guess is that I'm not properly accessing the repository for the user account but can't figure out what the correct method would be (I've tried countless variations with no success).

Any advice would be greatly appreciated!

This question is marked "community wiki".

asked 05 Apr '11, 03:39

cusp
112
accept rate: 0%


Hi,

The problem seems to be that

git clone otheruser@myaccount.webfactional.com:webapps/git/repos/myrepository.git

looks for the refs file in /home/otheraccount/webapps/git/repos/myrepository.git/info/refs which obviously does not exist.

What you need to do is use is: git clone otheruser@myaccount.webfactional.com:/home/primaryuser/webapps/git/repos/myrepository.git

but for that you would need to give permissions to the other use using:

http://docs.webfaction.com/software/general.html?highlight=grant#granting-access-to-specific-users

Hope that helps!

permanent link

answered 05 Apr '11, 04:11

neeravk
1.5k3412
accept rate: 41%

Thanks so much for your fast response, Neeravk — this is really helpful.

Unfortunately, I'm now getting an error in trying to set up the permissions via setfacl:

setfacl -R -m u:newuser:rwx $HOME/webapps/git/repos/myrepository.git/*

The error I consistently get (even when I change various arguments) is

setfacl: Option -m: Invalid argument near character 3

I've tried different combinations of the command, but I always get some variation of the above error.

Sorry, I'm fairly new to server config stuff, so I really appreciate the help.

(05 Apr '11, 06:05) cusp

This error is displayed when you are using an incorrect username in the command. Please make sure that you are replacing "newuser" with an username that actually exists on the system.

(05 Apr '11, 06:25) tie

Ah, I see. I thought that's what I was doing with setfacl, but now I realize it only grants permissions to existing users. It looks as though I add new users via the Account ? SSH/sftp user option in the Control Panel menu. I'll try that then do the setfacl.

Thanks again!

(05 Apr '11, 06:43) cusp

I don't feel like Neeravk's solution is really a solution. The instructions at http://docs.webfaction.com/software/git.html do not indicate any of these steps. Adding a git users is clear and simple until you try it. Then you have to hunt for documentation that give another set of instructions.

Can github either fix the documentation or fix the process?

(22 Aug '13, 09:43) noose

The github instructions for setting up a new user do not indicate any of these steps. The documentation should be updated to indicate this additional information. Setting up a git hub user is not a simple two steps!!

(22 Aug '13, 09:45) noose

The instructions at Managing Users have all of the information you need to create and delete new Git users to access your repo via HTTP. It really is that simple.

The instructions presented here are only needed when accessing a repo via SSH.

(22 Aug '13, 12:59) seanf
showing 5 of 6 show 1 more comments

Thanks! After adding a user via the control panel (with a shell), and a few setfacls:

  1. setfacl -m u:newuser:--x $HOME/webapps/git/repos (repeat down til $HOME as necessary)
  2. setfacl -R -m u:newuser:rwx $HOME/webapps/git/repos/myrepo.git

...I was able to successfully clone a repo via "git clone newuser@git.rowk.com:/home/YOURUSER/webapps/git/repos/myrepo.git"

permanent link

answered 04 Sep '12, 15:19

mrooney
1
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×111
×64

question asked: 05 Apr '11, 03:39

question was seen: 8,310 times

last updated: 22 Aug '13, 12:59

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM