Revert "Add automatic configuration of Gitea credential helpers for go-gitea.mywire.org and 192.168.88.97:3000, and enhance --checks to show detailed status for these servers"

This reverts commit 6c4892e961.
This commit is contained in:
kdusek
2025-11-13 17:37:59 +01:00
parent 6c4892e961
commit e48dec460b

View File

@@ -395,53 +395,22 @@ configure_git_presets() {
presets_needed+=("git config --global credential.https://bitbucket.org.helper manager") presets_needed+=("git config --global credential.https://bitbucket.org.helper manager")
fi fi
# Check specific Gitea configurations # Check Gitea configuration (if any Gitea URL is configured)
local gitea_configured=0 local gitea_urls=0
local gitea_needed=() gitea_urls=$(git config --global --get-regexp "credential.*gitea.*helper" 2>/dev/null | wc -l) || gitea_urls=0
if [[ $gitea_urls -gt 0 ]]; then
# Check go-gitea.mywire.org print_success "✓ Gitea credential helpers configured ($gitea_urls found)"
local gitea1_helper=""
gitea1_helper=$(git config --global --get credential.https://go-gitea.mywire.org.helper 2>/dev/null) || gitea1_helper=""
if [[ "$gitea1_helper" == "manager" ]]; then
print_success "✓ Gitea (go-gitea.mywire.org) credential helper configured"
gitea_configured=$((gitea_configured + 1))
else
print_warning "✗ Gitea (go-gitea.mywire.org) credential helper not configured"
gitea_needed+=("git config --global credential.https://go-gitea.mywire.org.helper manager")
fi
# Check 192.168.88.97:3000
local gitea2_helper=""
gitea2_helper=$(git config --global --get credential.https://192.168.88.97:3000.helper 2>/dev/null) || gitea2_helper=""
if [[ "$gitea2_helper" == "manager" ]]; then
print_success "✓ Gitea (192.168.88.97:3000) credential helper configured"
gitea_configured=$((gitea_configured + 1))
else
print_warning "✗ Gitea (192.168.88.97:3000) credential helper not configured"
gitea_needed+=("git config --global credential.https://192.168.88.97:3000.helper manager")
fi
# Check for other Gitea configurations
local other_gitea_urls=0
other_gitea_urls=$(git config --global --get-regexp "credential.*gitea.*helper" 2>/dev/null | grep -v "go-gitea.mywire.org\|192.168.88.97:3000" | wc -l) || other_gitea_urls=0
if [[ $other_gitea_urls -gt 0 ]]; then
print_success "✓ Additional Gitea credential helpers configured ($other_gitea_urls found)"
fi
if [[ $gitea_configured -eq 2 ]]; then
presets_configured=$((presets_configured + 1)) presets_configured=$((presets_configured + 1))
fi else
print_warning "✗ No Gitea credential helpers configured"
# Add needed Gitea configs to presets_needed presets_needed+=("# For Gitea servers, configure domain-specific helper:")
if [[ ${#gitea_needed[@]} -gt 0 ]]; then presets_needed+=("git config --global credential.https://go-gitea.mywire.org.helper manager")
presets_needed+=("# Configure Gitea credential helpers:")
presets_needed+=("${gitea_needed[@]}")
fi fi
# Summary # Summary
echo echo
print_status "Git Credential Manager Configuration Summary:" print_status "Git Credential Manager Configuration Summary:"
print_status "Presets configured: $presets_configured/7" print_status "Presets configured: $presets_configured/6"
if [[ ${#presets_needed[@]} -eq 0 ]]; then if [[ ${#presets_needed[@]} -eq 0 ]]; then
print_success "All recommended presets are configured!" print_success "All recommended presets are configured!"