{"thread":{"id":"39796","subject":"ssh admin git accidentally deleted","startedAt":"2015-07-07T13:30:59Z","lastAt":"2015-07-08T05:38:46Z","messageCount":4,"participants":["agnes retnaningsih","Konstantin Khomoutov","Fredrik Gustafsson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"265668","messageId":"CAF1FN5CDnUYxjChO2PZFrDnPRUiuqXhko=iDo=tuqwvJJdUg5A@mail.gmail.com","threadId":"39796","inReplyTo":null,"subject":"ssh admin git accidentally deleted","fromName":"agnes retnaningsih","fromEmail":"agnes.monest@gmail.com","sentAt":"2015-07-07T13:30:59Z","receivedAt":"2015-07-07T13:30:59Z","isPatch":false,"sender":{"key":"agnes.monest@gmail.com","avatar":null},"body":"Dear git , I accidentally delete ssh admin git, unfortunately there\njust one admin so I can't make a change in the config and push to the\nrepository. If there's a way undo the change or make an existing user\nbecome an admin or is there any super admin command?\n\nI use git version 1.7.5.4\n\nThanks.\nBest Regard,\n\n\nAgnes\n"},{"id":"265670","messageId":"20150707164708.10cd2b169187636bef4dbe6e@domain007.com","threadId":"39796","inReplyTo":"CAF1FN5CDnUYxjChO2PZFrDnPRUiuqXhko=iDo=tuqwvJJdUg5A@mail.gmail.com","subject":"Re: ssh admin git accidentally deleted","fromName":"Konstantin Khomoutov","fromEmail":"kostix+git@007spb.ru","sentAt":"2015-07-07T13:47:08Z","receivedAt":"2015-07-07T13:47:08Z","isPatch":false,"sender":{"key":"kostix+git@007spb.ru","avatar":null},"body":"On Tue, 7 Jul 2015 20:30:59 +0700\nagnes retnaningsih <agnes.monest@gmail.com> wrote:\n\n> Dear git , I accidentally delete ssh admin git, unfortunately there\n> just one admin so I can't make a change in the config and push to the\n> repository. If there's a way undo the change or make an existing user\n> become an admin or is there any super admin command?\n> \n> I use git version 1.7.5.4\n\nGit itself has no concept of users or user access controls.\nFrom the description of the problem, it appears you're using\nGitolite [1] as a front-end to Git.\n\nI can't unambiguously decode what \"delete ssh admin git\" means\nbecause to me, it can mean at least two things:\n1) You have deleted the SSH account used to push your Gitolite\n   configuration on your server.\n2) You have deleted the public key of the Gitolite admin user\n   from your repository, and pushed.\n\nIn the case you have to log into your server (via SSH or other means)\nfirst.\n\nThen, in the first case,\n1) Re-create the account;\n2) Generate another SSH key for it;\n3) Take the public part of this key, clone the Gitolite config\n   repo locally (on the server), replace the admin's key there\n   with the new key, commit, push.\n4) Transport the private admin's key to the machine you're\n   administering Gitolite from.\n\nIn the second case,\n1) Clone the Gitolite config repo locally (on the server);\n2) Revert the commit which nuked the admin's key (by using the\n   regular `git revert` command, commit and push.\n\nNote that this all implies you have enough permissions on your server.\n\n1. https://github.com/sitaramc/gitolite\n"},{"id":"265672","messageId":"20150707134942.GA7613@paksenarrion.iveqy.com","threadId":"39796","inReplyTo":"CAF1FN5CDnUYxjChO2PZFrDnPRUiuqXhko=iDo=tuqwvJJdUg5A@mail.gmail.com","subject":"Re: ssh admin git accidentally deleted","fromName":"Fredrik Gustafsson","fromEmail":"iveqy@iveqy.com","sentAt":"2015-07-07T13:49:43Z","receivedAt":"2015-07-07T13:49:43Z","isPatch":false,"sender":{"key":"iveqy@iveqy.com","avatar":"https://avatars.githubusercontent.com/u/761743?v=4"},"body":"On Tue, Jul 07, 2015 at 08:30:59PM +0700, agnes retnaningsih wrote:\n> Dear git , I accidentally delete ssh admin git, unfortunately there\n> just one admin so I can't make a change in the config and push to the\n> repository. If there's a way undo the change or make an existing user\n> become an admin or is there any super admin command?\n\nGit does not have access control at all. There's no admin in git. You're\ntalking about a hosting solution for git and you're not telling which\none you're using. If you want a better answer you need to provide more\ninformation.\n\n_Assuming_ you're using gitolite on Linux you can always use the root\naccount on the server to correct any mistakes you did in the gitolite\nconfiguration.\n\n> \n> I use git version 1.7.5.4\n\nWhat's the reason for using a 4 year old version? You're missing a lot\nof development. It's like using an iPhone 4s today instead of an iPhone\n6.\n\n-- \nFredrik Gustafsson\n\nphone: +46 733-608274\ne-mail: iveqy@iveqy.com\nwebsite: http://www.iveqy.com\n"},{"id":"265806","messageId":"20150708053846.GB7613@paksenarrion.iveqy.com","threadId":"39796","inReplyTo":"CAF1FN5BMTTatfTmVYjpKcqczefur3ETjbqyEk1vSmdruY82quw@mail.gmail.com","subject":"Re: ssh admin git accidentally deleted","fromName":"Fredrik Gustafsson","fromEmail":"iveqy@iveqy.com","sentAt":"2015-07-08T05:38:46Z","receivedAt":"2015-07-08T05:38:46Z","isPatch":false,"sender":{"key":"iveqy@iveqy.com","avatar":"https://avatars.githubusercontent.com/u/761743?v=4"},"body":"On Wed, Jul 08, 2015 at 12:32:42AM +0700, agnes retnaningsih wrote:\n> I use gitolite on linux.\n> he2nk is account that I delete on server where gitolite-admin is repository\n> to change gitolite configuration. I still can make editing such as add user\n> to access gitolite-admin  but when I push it, it error ( file attached), I\n> think it because the he2nk has been deleted.\n> \n> \n> he2nk is ssh that I have deleted and push it to the server.\n> \n> \n> So, if there anyway to revert the change I pushed?? so that I can make a\n> change on gitolite admin.\n> \n\n\nSo from what I understand he2nk is a gitolite account and not a linux\naccount. And you deleted he2nk from your gitolite-admin repository.\n\nYes you can revert this and you can also add he2nk again, whatever you\nlike. But as you've seen you can't do this with gitolite. You've to do\nthis directly on the server since you don't have access to edit the\ngitolite-admin repository (if I guess correct).\n\nPlease don't forget to CC the git-list.\n\n\n-- \nFredrik Gustafsson\n\nphone: +46 733-608274\ne-mail: iveqy@iveqy.com\nwebsite: http://www.iveqy.com\n"}]}