Page MenuHomePhabricator

script/bot accounts can't use VCS credentials for Git although UI suggests it should work
Closed, ResolvedPublic


Repro steps:

  1. Set up a local git repo using Diffusion
  2. Create a script/bot account
  3. Navigate to http://<phabricator instance url>/settings/<id of bot account you just created>/panel/vcspassword/
  4. Set a VCS password
  5. Try to use the bot's name and VCS password to do a git checkout

Expected result: the checkout is successful
Actual result: error: The requested URL returned error: 403 Invalid credentials. while accessing http://<username>:<password>@<phabricator instance url>/diffusion/<repo path>/info/refs

I've been able to use git successfully with my personal user for the past month just fine (as has the rest of the team I work with). It's just that the script/bot user doesn't work. We want to use a script/bot account to handle production pushes using git so any of us can log into the prod machine and do a push.

If for some reason script/bot accounts aren't able to do this, there probably should be an error message with instructions on the VCS password page for scripts/bots. Otherwise, it seems like this should work.

Event Timeline

Taskle raised the priority of this task from to Needs Triage.
Taskle updated the task description. (Show Details)
Taskle added a subscriber: Taskle.
epriestley edited this Maniphest Task.

Actually, this is probably not related to T4921. This is expected to work properly.

I can't reproduce this -- I was able to set credentials for a bot and clone a repository.

Two thoughts:

  • Try GIT_CURL_VERBOSE=1 git clone ... to maybe get a more detailed error?
  • Make sure the bot has read access to the repository?
btrahan claimed this task.

Closing from lack of followup.

I know this task is old / resolved but it comes up in a Google search for this problem.

Pull issues : make sure the script user is in the Visible To policy (user, group, project etc) for the repo
Push issues : same but for the "Can Push" policy for the repo