git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: ssh admin git accidentally deleted

From
KKKonstantin Khomoutov <kostix+git@007spb.ru>
Date
Jul 7, 2015, 13:47 UTC
Message-ID
<20150707164708.10cd2b169187636bef4dbe6e@domain007.com>
In-Reply-To
<CAF1FN5CDnUYxjChO2PZFrDnPRUiuqXhko=iDo=tuqwvJJdUg5A@mail.gmail.com>

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

Show 6 quoted lines
> 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
Previous: agnes retnaningsihNext: Fredrik Gustafsson
Message 2 of 4 in “ssh admin git accidentally deleted”
  1. agnes retnaningsihJul 7, 2015
  2. Konstantin KhomoutovJul 7, 2015
  3. Fredrik GustafssonJul 7, 2015
  4. Fredrik GustafssonJul 8, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.