I tried the way you told me, but nothing changed. I followed the above 
steps:
1. stop the GoCD server service
2. delete the config file
3. start the server service
And then the config file was shown again and the content is same as the 
file was deleted.

在2023年8月8日星期二 UTC+8 11:11:21<Chad Wilson> 写道:

> Forgot to add that if the server seems to be restoring the "old" content, 
> make sure that the service is not running at the time you manually edit the 
> config on disk. The server may cache, flush and overwrite config for 
> various reasons so best to avoid this by ensuring it isn't running or 
> "competing" with your manual edits.
>
> On Tue, Aug 8, 2023 at 10:40 AM Chad Wilson <[email protected]> 
> wrote:
>
>> 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 <[email protected]> 
>> 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 <[email protected]> 
>>>> 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 [email protected].
>>>>> 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 [email protected].
>>> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/4f707b94-4b50-4fb9-952b-6317accf5ad0n%40googlegroups.com.

Reply via email to