Remove user from Gitorious. Using script/console to manage Gitorious from Backend

By neokrates, written on October 10, 2010

howto

  • Join date: 11-30-99
  • Posts: 224
View Counter:
  • 585 views
Rate it
Ad
Poll
  • Which virtualization is used on your Enterprise?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext

In current version many user related functions are not accessible from Gitorious Web Interface. You can use ruby console to connect with current Gitorious instance and remove the user.

Login to the Gitorious host. You will likely need the root to do that or at least the user under which Gitorious runs.

Find your gitorious console

Smth. like locate console|grep script/console

1

What is your environment’s name

Per default, environment may be called “production”. To find out, you can try the log directory, in my case it is in /var/www/gitorious/log/. In my case there was production.log.
That is the environment name.

2

Start console


/var/www/gitorious/script/console

If you guessed your YOUR_ENV_NAME correctly, you get:

Loading production environment (Rails 2.3.5)

3

Find & delete user

Given your user is “username”, type in console:

user = User.find_by_login "username"

You get smth like:

=> #<User id: 7, login: "username", email: "username@yourcorp.com", ... >

 
to delete type: user.destroy

Have fun ;)

Be Sociable, Share!
 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: +4 (from 6 votes)
5 votes 'YES'  1 votes 'NO'


TAGS

SOCIAL
Be Sociable, Share!

INCOMING SEARCH TERMS


Leave a Reply