I am trying to configure git p4 on windows. I have installed git bash, python and p4 and am able to access them on cmd prompt. But can't get
git p4
command to work. It throws error -
"fatal: 'p4' appears to be a git command, but we were not able to execute it. Maybe git-p4 is broken?"
Git Installed At - C:\\Git\\bin
Python At- C:\\Python37-32
I have also kept git-p4.py file under git\\bin and under \\git-core. Also, there is a file called git p4 inside the \\git-core foler.
Here are the contents of gitconfig under : C:\\Git\\mingw64\\etc
[http]
sslCAInfo = C:/Git/mingw64/ssl/certs/ca-bundle.crt
sslBackend = openssl
[diff "astextplain"]
textconv = astextplain
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[credential]
helper = manager
[p4]
p4 = !'C:\\Git\\bin\\git-p4.py'
What's wrong here ?
There were some very fundamental mistakes in what I was doing. If anyone is facing similar issue , please see below comments -
Initialy the global gitconfig file might not be present in user directory.
Run this command in git bash to force it's creation : git config --edit --global
For more information : https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Where-system-global-and-local-Windows-Git-config-files-are-saved
Then, add this to .gitconfig file. ( I was doing [P4] instead of [alias] )
[alias]
p4 = !'C:\\Git\\bin\\git-p4.py'
Make sure you are able to run python & p4 command from git bash.
refer this if you face any issue with python : Python not working in the command line of git bash
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.