Comments (8)
Hi, thanks for report, this is strange.
Try execute commands manually in command line and check if they works.
If they works, dump current working directory and exit-codes. Insert var_dump
before this line https://github.com/czproject/git-php/blob/master/src/GitRepository.php#L584:
var_dump(array($ret, getcwd(), $this->cwd, $this->repository));
And sent me the output here.
from git-php.
One additional question - what is your OS?
from git-php.
Hi Janpecha,
Output:
cmd : git commit -m "init commit"
var_dump:
F:\latte\api_v2\core\vendor\czproject\git-php\src\GitRepository.php:586: array (size=4) 0 => int 128 1 => string 'F:\latte\devlibs\tmp\brewdemo' (length=29) 2 => string 'F:\latte\api_v2\core' (length=20) 3 => string 'F:\latte\devlibs\tmp\brewdemo' (length=29)print_r:
Array
(
[0] => 128
[1] => F:\latte\devlibs\tmp\brewdemo
[2] => F:\latte\api_v2\core
[3] => F:\latte\devlibs\tmp\brewdemo
)OS is Windows 10.
But, I have tried this in the linux box (Cent OS 6.7) where nothing is working for me. So, i don't know what went wrong. Then i moved to windows to verify this. I faced those issues (commit, add remote and push).
Thanks...
from git-php.
In linux box:
cmd : git commit -m 'init commit'
output:
array(4) {
[0]=>
int(127)
[1]=>
string(17) "/repo_manage/demo"
[2]=>
string(36) "/stagebrewservices/latte_v2/api/core"
[3]=>
string(17) "/repo_manage/demo"
}
Note: We have not installed the git server on both Windows and Linux server.
from git-php.
Yeah, you need install git
client (see https://git-scm.com/download/linux) and it must be in system variable PATH
. This PHP library is only wrapper over command line.
For Linux box exit-code 127 means "command not found".
from git-php.
Yes.. I installed git client on the linux box. Now it is working till commit process.
Push origin command is not working. Thanks a lot for your support.
But, I can execute the command by manually which asks to enter credentials also.
output:
git push origin
array(4) {
[0]=>
int(128)
[1]=>
string(22) "/repo_manage/sampleone"
[2]=>
string(36) "/stagebrewservices/latte_v2/api/core"
[3]=>
string(22) "/repo_manage/sampleone"
}
from git-php.
git push
is a little bit problematic. Currently is not posiblle take user+password into $git->push()
method. I will try find any solution for it, but it takes some time. You can temporarily:
- use SSH (+SSH key) instead of HTTPS with user+password
- save credentials to cache (see http://www.tilcode.com/push-github-without-entering-username-password-windows-git-bash/ or https://help.github.com/articles/caching-your-github-password-in-git/)
- insert password & user into
remote
(git add remote origin "https://user:password@server/path")
EDIT:
- for
push()
you can use--repo
argument - https://stackoverflow.com/a/12193555$git->push(NULL, array('--repo' => 'https://user:password@server/path/repo.git'));
from git-php.
Ok.. Thanks for your support...
from git-php.
Related Issues (20)
- Can't install this package HOT 1
- Return type annotations erroneously specify self HOT 1
- Is this library production ready? HOT 1
- Is this library using the PHP exec() function to run git command? HOT 3
- Issue with big repos and branch listings HOT 2
- getLastCommitId fails HOT 1
- checkout with depth HOT 4
- Can we access the private repositories with username and password. ? HOT 5
- How do we get list of modified Files and removed files from local Repo ? HOT 1
- Git Commit Command Fails (Exit Code 1) HOT 3
- Authentication failed with Bitbucket private repository HOT 1
- --end-of-options is not supported on git 2.35.1 and 2.25.1 HOT 20
- How to log the output of the Git commands? HOT 1
- Class to get config properties
- Git command failed (exit-code 129) unknown option: 'end-of-option' HOT 2
- Command 'git add --end-of-options '/media/mehdi/inwork/newsample/readme.txt'' failed (exit-code 128). HOT 3
- sample of Clone HOT 4
- Github connection tester does not work through http HOT 2
- Setting environment variables for git command HOT 1
- Looks like addFile cannot handle umlauts HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-php.