I can't recall exactly how it works, but perhaps if the config file is
*completely
removed* like you say you did below, GoCD does some magic to restore the
latest known version from the history git repo (that I referred to below)
rather than starting from scratch.

The most reliable way is to look at the config history in *db/config.git*
(as I mentioned below) to see what your config was before you added the
LDAP config and use the git history to restore the content.

However if you just want to completely remove the security/login
requirement and any "local" users you have marked as admins etc you should
be able to edit the cruise-config.xml directly and remove the entire <security>
...</security> block, leaving other pieces unchanged. Configuration without
a security block at all won't require any login.

-Chad

On Tue, Aug 8, 2023 at 10:23 AM Alex Murphy <alexmurphy0...@outlook.com>
wrote:

>
> Hi Chad,
>
> Yeah, I forgot to tell you the GoCD server is a Windows version, and I
> located the file, but I tried to delete the content or this file, then I
> restarted the GoCD Server Service, and the file will recover from before.
> How can I change the login type to default that login without any account
> or password?
>
> Thanks
>
> 在2023年8月7日星期一 UTC+8 16:27:15<Chad Wilson> 写道:
>
>> The server configuration that controls this is plain XML, and has source
>> controlled history using git itself so you can use standard git tools (git
>> log, git show etc) to find the config revision as it was before your change
>> and revert the security/login settings back to what they were before.
>>
>> Location of both the "current" config and the config history depends on
>> how you are running/installing the GoCD server (Linux package install?
>> Windows? containers?) The history should be a config.git subfolder of the
>> 'db' folder. The latest config should be a cruise-config.xml inside the
>> "GoCD Server configuration" folder.
>>
>>
>> https://docs.gocd.org/current/installation/install/server/linux.html#location-of-gocd-server-files
>>
>> https://docs.gocd.org/current/installation/install/server/windows.html#location-of-gocd-server-files
>> https://hub.docker.com/r/gocd/gocd-server/
>>
>> -Chad
>>
>> On Mon, Aug 7, 2023 at 4:09 PM Alex Murphy <alexmur...@outlook.com>
>> wrote:
>>
>>> Hi guys,
>>> I encountered a problem on login surface, the reason is I made a mistake
>>> in the server config, I set the wrong LDAP and clicked save, and now I
>>> cannot log in when I input any accounts and passwords.
>>> And I tried to reinstall the GoCD Server and it was not work.
>>> Can anyone give me some suggestions?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "go-cd" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to go-cd+un...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/go-cd/7cdbc223-66dd-4055-9c52-86071fedf1b7n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/go-cd/7cdbc223-66dd-4055-9c52-86071fedf1b7n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "go-cd" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to go-cd+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/go-cd/b00cfcd8-77fb-4200-b802-d39e775043bfn%40googlegroups.com
> <https://groups.google.com/d/msgid/go-cd/b00cfcd8-77fb-4200-b802-d39e775043bfn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/CAA1RwH_sjxHMch6gcKoShfjJM5pOnk0HzF6S-g8CA-f2jUzzCA%40mail.gmail.com.

Reply via email to