gitlab-cli icon indicating copy to clipboard operation
gitlab-cli copied to clipboard

Error "Could not find X command"

Open enribd opened this issue 10 years ago • 6 comments

Gitlab version: 5.0.1 (Turnkey appliance) Installed via: "gem install gitlab_cli" command Created config file in home directory.

When I try to run commands like "gitlab project add test_project" or "gitlab groups" I get the error --> "Could not find X command". It's weird that the command "gitlab projects" works fine though. Any ideas what could it be?

I need gitlab-cli tool to code a script which automates the creation of a couple hundreds of projects in gitlab web ui for my job. I've read the docs and I think this tool is awesome but I cannot make it work properly. Please help.

enribd avatar May 13 '14 07:05 enribd

Same here, installed via gem and 'gitlab project add' I get 'command add not found.

malnick avatar May 13 '14 21:05 malnick

I also installed via clone and rake and had the same outcome.

malnick avatar May 13 '14 21:05 malnick

Clone and rake just worked for me on Ubuntu 14.04 for anyone in the future who runs into this problem.

TheConnMan avatar Sep 22 '14 15:09 TheConnMan

OSX 11,

$ gitlab project help add Could not find command "add".

34r7h avatar Apr 14 '15 23:04 34r7h

I think the gem is failing to put it in PATH. In cygwin (ruby is native, not via RVM, etc) here's what I did:

Marc-win8:gitlab-cli $ gitlab --version
-bash: gitlab: command not found
Marc-win8:gitlab-cli $ find ~ -name 'gitlab'
/c/Users/myoung/.gem/ruby/gems/gitlab-3.4.0/bin/gitlab
/c/Users/myoung/.gem/ruby/gems/gitlab-3.4.0/lib/gitlab
/c/Users/myoung/.gem/ruby/gems/gitlab-3.4.0/spec/gitlab
Marc-win8:gitlab-cli $ /c/Users/myoung/.gem/ruby/gems/gitlab-3.4.0/bin/gitlab --version
Gitlab Ruby Gem 3.4.0
Marc-win8:gitlab-cli $ ln -s /c/Users/myoung/.gem/ruby/gems/gitlab-3.4.0/bin/gitlab /usr/bin/gitlab
Marc-win8:gitlab-cli $ gitlab --version
Gitlab Ruby Gem 3.4.0

OS X, etc would be similar. To make this a permanent fix you'd want to put something in your ~/.bash_profile file, although I would not recommend linking to that version gem. If you update your gem, then you woulnd't be using the updated version.

Perhaps a real fix should be made, but this might at least get you guys started.

myoung34 avatar May 04 '15 16:05 myoung34

Same here gitlab project add .. says "Could not find comand "add"." on Ubuntu 14.04, installed with gem, version 2.0.0

WeiTang114 avatar Sep 07 '15 10:09 WeiTang114