GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Issue while trying to commit - "repo.index.commit" · Issue #1129 · gitpython-developers/GitPython

Issue while trying to commit - "repo.index.commit" #1129

New issue
Copy link
New issue
Copy link
Closed
Closed
Issue while trying to commit - "repo.index.commit"#1129
Copy link
Labels
Q&A

Description

@ameyapranjale
ameyapranjale
opened on Feb 21, 2021
Issue body actions

I can see a similar open issue but it relates to post-commit, hence adding this.

Traceback (most recent call last):
File "C:\Python37\lib\site-packages\git\index\fun.py", line 83, in run_commit_hook
creationflags=PROC_CREATIONFLAGS,)
File "C:\Python37\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "C:\Python37\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\XXXX\Desktop\auto_mate\deployment\gitautomate.py", line 42, in
repo1.index.commit("first commit")
File "C:\Python37\lib\site-packages\git\index\base.py", line 944, in commit
run_commit_hook('pre-commit', self)
File "C:\Python37\lib\site-packages\git\index\fun.py", line 85, in run_commit_hook
raise HookExecutionError(hp, ex) from ex
git.exc.HookExecutionError: Hook('C:\Users\XXXX\Desktop\auto_mate\deployment\clonedir.git\hooks\pre-commit') failed due to: OSError('[WinError 193] %1 is not a valid Win32 application')
cmdline: C:\Users\XXXX\Desktop\auto_mate\deployment\clonedir.git\hooks\pre-commit

Activity

  1. ameyapranjale commented on Feb 21, 2021

    @ameyapranjale
    ameyapranjale
    on Feb 21, 2021
    Author
    More actions

    ---------------pre- commit file --------------

    #!/bin/sh

    HOOKS_DIR=$(dirname $0)

    acn_git_hooks_deploy_id XXXX

    export CONFIG_DIRECTORY='C:/Users/XXXX/.acn-security-tools/config'
    if uname | grep "MINGW"* > /dev/null;
    then
    py ${HOOKS_DIR}/detect_remote
    py ${HOOKS_DIR}/detect_secret
    else
    python ${HOOKS_DIR}/detect_remote
    python ${HOOKS_DIR}/detect_secret
    fi

  2. Byron
    added
    Q&A
    on Feb 22, 2021
  3. Byron commented on Feb 22, 2021

    @Byron
    Byron
    on Feb 22, 2021
    Member
    More actions

    As shown by File "C:\Python37\lib\subprocess.py", line 1207, in _execute_child subprocess is used to execute hooks. On windows, this probably doesn't include shellscripts.

    Fixing this would be possible and a PR is certainly welcome.
    Please feel free to keep commenting on the closed issue for follow-ups.

  4. Byron
    closed this as completedon Feb 22, 2021
  5. Byron
    reopened this on Feb 26, 2021
  6. Byron
    closed this as completedon Feb 26, 2021
  7. gitpython-developers
    locked and limited conversation to collaborators on Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Q&A

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.