diff --git a/images/odoo/bin/clone-git-addons b/images/odoo/bin/clone-git-addons index 8e1c5496..21a78953 100755 --- a/images/odoo/bin/clone-git-addons +++ b/images/odoo/bin/clone-git-addons @@ -18,11 +18,8 @@ if [[ -n "$ADDONS_GIT_REPOS" ]]; then [[ "$forgejo_url" =~ ^[a-zA-Z]+:// ]] || forgejo_url="https://${gitlab_url}" # Setup git SSH key - mkdir -p "$HOME/.ssh" - chmod 700 "$HOME/.ssh" add-ssh-key - # Make every git directory a safe directory git config --global --add safe.directory '*' @@ -91,6 +88,5 @@ if [[ -n "$ADDONS_GIT_REPOS" ]]; then fi done - # Remove git SSH key remove-ssh-key fi diff --git a/images/odoo/bin/download-odoo-enterprise b/images/odoo/bin/download-odoo-enterprise index 551db512..83c2498a 100755 --- a/images/odoo/bin/download-odoo-enterprise +++ b/images/odoo/bin/download-odoo-enterprise @@ -32,15 +32,11 @@ if [[ -z "$last_ref" ]] || [[ "$last_ref" != "$ODOO_ENTERPRISE_REF" ]]; then elif [[ "$git_proto" = "ssh://" ]]; then - mkdir -p "$HOME/.ssh" - chmod 700 "$HOME/.ssh" add-ssh-key ssh-keyscan -t rsa,ed25519 "$git_hostname" >> "$HOME/.ssh/known_hosts" 2>/dev/null + rm "$ref_file" if [[ ! -d "$odoo_enterprise_path/.git" ]]; then - - find "$odoo_enterprise_path" -mindepth 1 -maxdepth 1 ! -name '.last_ref' -exec rm -rf {} + - log-entrypoint "Init ${odoo_enterprise_url} in $odoo_enterprise_path." git -C "$odoo_enterprise_path" init -q git -C "$odoo_enterprise_path" remote add origin "$odoo_enterprise_url"