On Tue, 7 Jul 2015 20:30:59 +0700
agnes retnaningsih <agnes.mon...@gmail.com> wrote:

> Dear git , I accidentally delete ssh admin git, unfortunately there
> just one admin so I can't make a change in the config and push to the
> repository. If there's a way undo the change or make an existing user
> become an admin or is there any super admin command?
> 
> I use git version 1.7.5.4

Git itself has no concept of users or user access controls.
>From the description of the problem, it appears you're using
Gitolite [1] as a front-end to Git.

I can't unambiguously decode what "delete ssh admin git" means
because to me, it can mean at least two things:
1) You have deleted the SSH account used to push your Gitolite
   configuration on your server.
2) You have deleted the public key of the Gitolite admin user
   from your repository, and pushed.

In the case you have to log into your server (via SSH or other means)
first.

Then, in the first case,
1) Re-create the account;
2) Generate another SSH key for it;
3) Take the public part of this key, clone the Gitolite config
   repo locally (on the server), replace the admin's key there
   with the new key, commit, push.
4) Transport the private admin's key to the machine you're
   administering Gitolite from.

In the second case,
1) Clone the Gitolite config repo locally (on the server);
2) Revert the commit which nuked the admin's key (by using the
   regular `git revert` command, commit and push.

Note that this all implies you have enough permissions on your server.

1. https://github.com/sitaramc/gitolite
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to