andr3as / codiad-codegit Goto Github PK
View Code? Open in Web Editor NEWGit integration for Codiad
License: MIT License
Git integration for Codiad
License: MIT License
I had the case that i need to remove csv files with > 5MB. On trying to commit it with codiad, it tried to create a git diff at the commit tab. First FF & Chrome were hanging, than later both crashed.
It would be nice to have an option for disabling the automatic "git diff" when opening the commit tab.
(i've fixed it by using the command line git client, but not every user has this possibility)
Hello,
I've been using CodeGit on Codiad for a moment now, and I find it so useful, thank for that.
But I found a problem : commit messages are bad encoded/escaped. As I am french, using other characters than pure ASCII, it is a problem to me. Here is an example :
I enter this commit message : "Correction d'une traduction", in git log, the message become "Correction d'une traduction". Or "Amlioration de la rcupration" registered instead of "Amélioration de la récupération".
Here is a snippet of my git log (see the special characters "à" and "é" in the commit made through commandline) :
commit bd9f5b48a94578eba288ae23ee9c3b8b975c2683
Author: Myself through commandline <[email protected]>
Date: Wed Dec 30 22:26:27 2015 +0100
Journaux à intégrer : USA
commit 52991bc5a76d9e02ba120f2d1826c85aa8d45ec0
Author: Myself through Codiad CodeGit <[email protected]>
Date: Wed Dec 30 13:58:57 2015 +0100
Correction d\'une traduction
commit d1db5e3dcf4c4252f0b6a04fb5b4f994100af55d
Author: Myself through Codiad CodeGit <[email protected]>
Date: Wed Dec 30 13:40:59 2015 +0100
Amlioration de la rcupration des articles
Hope you could do something for me :)
My files have 640 permission on local machine. When i push them to git and then pull to production machine it changes to 644. For some reason my shared hosting server then gives Internal Server Error. When permission is changed back to 640 it works fine.
I havent have this problem using command line. I really like Codiad and your plugin which i discovered yesterday. I would love the option that pushed files would have the same permissions as local files.
git status
shows modified: makedb.sh
, but CodeGit doesn't recognize it.
Don't know what to do. Log is display correctly of the opened project. (expect is installed too).
Hi
I want to sync a git reository residing under something like:
gituser@localhost:/home/gituser/myrepo
Codiad stalls, when trying to clone this way. I would expect a question for password input.
ps aux
shows waiting ssh connection processes. I assume it is waiting for a password.
Should this work? Is it me, ssh'ing to localhost? Am I missing soem configuration?
Is there a way to get all branches?
Would it be possible to add ssh-key support? like persay, have the user upload a ssh-key to their profile and it uses that for pushing/pulling over ssh?
steps i think it should do
USER:
--->GenSSHkey
--->Auth said key with their git service
--->Upload key to Codiad server, which then is encrypted, with the encryption key being their user password
--->manually have user activate a specific uploaded key per each repo, incase two repo's dont share the same authorized key
SERVER:
--->Have git installed
CODEGIT:
--->When user push/pull, push/pull over ssh if user specifies to use SSH
This HTTP Request just hangs and crashes chrome, and safari.
/plugins/Codiad-CodeGit-master/controller.php?action=push&path=/path/to/app&remote=origin&branch=branch-name
What is mean this error?
When I commit changes the first time as a logged in user, it pops up a settings panel which asks for my username and email.
Same thing if I hit the "Settings" button in CodeGit.
Is there any way to lock it down if I don't want a user to override their login name?
Hi,
I installed codiad and CodeGit on FreeBSD running nginx and php56. I followed the guide as best as I could. I have expect present and my www user can run it (from shell). I set the correct path in scripts/expect.sh
. But I still get this error message whenever I try to git clone something:
Please install shell program!
When I create a new git project, I don't get an error message, but an empty project without any apparent git integration present.
Any idea as to what I might be doing wrong?
Follow up:
I looked into this and I managed to break it down to two issues:
plugins/Codiad-CodeGit-master/config.php
did the trick for me:putenv("PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin");
class.git.php
:- $result = $this->executeCommand('git config user.name "' . $username . '"');
+ $result = $this->executeCommand('git config --replace-all user.name "' . $username . '"');
I had to reset my remote git repository.
Afterwards i wasn't able to use codeGit anymore.
The remote repository didn't change at all, and works fine when trying to push/pull from another PC...
As soon as i try to pul from it via CodeGit i can't reach the ide anymore... it just crashes...
I'm not using ssh keys and i have configured expect correctly (worked before), i tryed to use a .netrc file as well...
Hello,
It seems that the file is ignore ?
Hello, I have a webserver running Nginx and PHP5 on my Raspberry Pi. I'm not really experienced with php5-fpm, Nginx or other things like that and their configurations.
When I try to push or pull to my remote, PHP just crashes. I can't load any PHP file after that. My php5-fpm logfile doesn't show anything abnormal, my Nginx error.log
file looks like this:
2014/07/15 16:42:19 [error] 4262#0: *417 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 88.138.49.173, server: , request: "GET /codiad/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "gildev.tk"
And my Nginx access.log
file looks like this:
88.138.49.173 - - [15/Jul/2014:16:43:59 +0200] "GET /codiad/ HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:31.0) Gecko/20100101 Firefox/31.0"
88.138.49.173 - - [15/Jul/2014:16:44:21 +0200] "-" 400 0 "-" "-"
88.138.49.173 - - [15/Jul/2014:16:44:31 +0200] "-" 400 0 "-" "-"
88.138.49.173 - - [15/Jul/2014:16:44:41 +0200] "-" 400 0 "-" "-"
88.138.49.173 - - [15/Jul/2014:16:44:51 +0200] "-" 400 0 "-" "-"
So the headers of the requests made after the crash seems… Empty.
To fix the problem I must enter sudo service php5-fpm restart
and everything goes back normal until I push/pull again.
I hope you'll find how to fix this, maybe do you need more log files. Thanks!
PS: Sorry if my english isn't perfect, I'm 16, french, and I learned english pretty much by myself.
Hi, thanks for this great software. Our use case is not for coding, but storing configuration files for the apps we run. We have teams of application admins (and DBAs) who do not know how to use git in the traditional sense. All I want them to be able to do is browse the git repo for their config file, edit the file using the browser editor, and then be forced to add a comment on what they changed and commit it. This way we have version control and can track who did what to the config files.
I'm thinking in the user control panel have a check box to indicate this user is git oblivious and then the only thing they can do with regards to git is edit files in the browser editor and then be forced to enter a comment and then commit. Any other git options would need to be hidden from them. I thought maybe once a file is saved it triggers the Commit dialog so they are forced to add a comment and then commit if they save a file. I know something gets triggered on save because it shows a visual cue in the left panel when the git repo is changed.
I did find out by editing the templates/overview.html file I can hide the git options except for Commit...but this hides it for everyone. I'm not a programmer so this is just me stabbing at it.
Any thoughts on that? Thanks!
I can't close issues in redmine automatically with "close #1234".
I will get "close #1234" and redmine can't detect the issue number.
codiad requires a login, so in theory it is possible to know who edited the files last. Does it pass the logged in user through to the git commit?
Hi
I'm trying to get Codiad and CodeGit going for the first time.
Git Init seems to work fine, but clicking on Open CodeGit returns "Failed to get status".
I've installed Terminal and if I run git from there it seems to behave itself.
Git version is 1.7.1.
Thanks for your help.
Hi, I think in Line 386 inside the class.git.php (https://github.com/Andr3as/Codiad-CodeGit/blob/master/class.git.php#L386) is an undefined variable.
Is there support for recursively cloning submodules? If so, how can I do this?
hi first i want to say thanks for your very nice project !!
i try to use Codiad-CodeGit but when i click on git clone
i have the message above. So i follow the procedure to tried to fix it .
vim config.php
uncomment define("shellProgram","expect");
sudo systemctl restart httpd.service ( i m in centos )
Installed Packages
expect.x86_64 5.45-14.el7_1
but i continue to have the same message ;( :(
Hi all,
thanks at first for this plugin to Codiad. I just started installing Codiad on shared hosting looking for an IDE which may permit to do basic web development via a git repository. I installed the plugin and verified permissions. Then I manually initiated a git repo in a folder, added a file and changed the content. The diff is accordingly to the changes made. When wanting to commit I receive the error "Failed commit!". I searched for the string and found something under the commit section. If I understand correctly the command
$git->commit(getWorkspacePath($_GET['path']), $_POST['message']);
leads to an error. The variables should be set, since I don't get errors while generating e.g. diff. So I reviewed the commit in class.git.php. Apparently a git command is being assembled there and executed. When going to the terminal within Codiad I get
git status
// On branch master
//
// Initial commit
//
// Untracked files:
// (use "git add <file>..." to include in what will be committed)
//
// test.txt
nothing added to commit but untracked files present (use "git add" to track)
So I do
git add test.txt
and then
git commit -m "empty"
and receive the message
// On branch master
// Changed but not updated:
// (use "git add <file>..." to update what will be committed)
// (use "git checkout -- <file>..." to discard changes in working directory)
//
// modified: test.txt
//
no changes added to commit (use "git add" and/or "git commit -a")
Any hints on what I could be doing wrong? I added the git command to Codiad via the config.php line
putenv("PATH=" .$_ENV["PATH"]. ':/usr/bin');
since it was not accessible in the standard php environment.
Best wishes
Sebastian
occasionally, i encounter an issue where it claims it "Fails to push" to my repo,
Upon checking the repo, it actually does push,
Paths with spaces causing errors: 'Test/example/file two.txt'
one workaround is to add
export GIT_SSL_NO_VERIFY=true
to the shell.sh
. Or make this optional with one more input handles. E.g. -ssl 0
for export GIT_SSL_NO_VERIFY=false
and 1
for true
.
OS: Windows 10E 1703 X64
Codiad ver: v.2.8.4
PHP: 7.1.7 x64
Getting this error when I go to the settings form in CodeGIT:
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\inetpub\wwwroot\Codiad\plugins\Codiad-CodeGit-master\dialog.php:1) in C:\inetpub\wwwroot\Codiad\common.php on line 88
I'm also unable to push/pull although, I'm not sure if that's related.
I can use GIT PUSH/PULL from the terminal, however.
I tried to apply this fix below, but didn't help:
Screenshot:
Hello,
when I try to commit when merging, I get a success, but then all push/pull fail and when I do git status on the project folder this comes:
On branch master Your branch and 'origin/master' have diverged, and have 2 and 1 different commit each, respectively. (use "git pull" to merge the remote branch into yours) All conflicts fixed but you are still merging. (use "git commit" to conclude merge)
if i try to pull:
error: You have not concluded your merge (MERGE_HEAD exists). hint: Please, commit your changes before merging. fatal: Exiting because of unfinished merge.
to fix I have to manually git push origin master on the folder. how do I fix it?
thanks
I run a FreeBSD box. Needless to say I ran into a few issues getting this to work because some of the executable files were hard coded locations.
Things I had to do to make this work.
add this line to config.pgp in CodeGit, fixes 'git command not found' error.
putenv("PATH=" .$_ENV["PATH"]. ':/usr/local/bin');
change the shell in shell.sh to /bin/sh. The standard location for bash in FreeBSD is /usr/local/bin/bash
change the location for expect from /usr/bin/expect to /usr/local/bin/expect
The other major hurdle in FreeBSD is the apache user 'www' has no home directory or no login shell. This needed to be changed to /bin/sh login shell (so 'www' user can execute shell.sh
) and a home directory of your choice so you can generate a rsa key to use with github if you want to clone/push/pull. Of course permissions need to be appropriate for 'www' user.
Some of these fixes could easily be fixed in the code. While the other information would be useful in an installation guide for FreeBSD or any other OS that doesn't follow debian guidelines. Hope this helps someone. Sorry if this was not the correct place to post this.
Hello,
The Diff button does not work. When I click on it all the page is refreshed.
It's the strange, everything else works great !! (so cool plugin!)
How do i setup/configure codiad to use pexpect for git authentication?
i could only find instructions on how to install it...
Really cool. Could you please allow settings to configure (per user):
PS: Yes I saw https://github.com/Andr3as/Codiad-CodeGit/wiki
When input non-latin commit message there is an error: "Failed to commit changes!"
With latin commit message everything OK.
My issue is similar to #56, for whatever reason I can't get the plugin to connect with my git repos. I've verified that my git/ssh servers are able to accept incoming connections, and even though I've installed both expect as well as pexpect (globally as well as for the www-data user with virtualenv), I keep running into the "please install shell program" error. Is there a way that I can get some additional logging info to see what it's doing? Thanks again for the plugin!
Hello!
I am testing Codiad CodeGIt to be the main colaborative ide for my development team. We use git but I noted CodeGit doesn't handle deleted files. When I delete one It does not appear on the changes list, just does when I modify a file.
Does it an issue? Or could it be a local problem?
Thanks!
Hi,
if I try to identify the problem with the file that is causing the push issue (see issue #11 ), it gives me an error message: "Failed to get diff".
The steps to reproduce were right clicking on the file and then selecting "Git Diff".
Thanks
Not sure how to debug this, i dont see logs anywhere in codiad, and php logs don't show anything, but im pretty sure my issue is w config anyway. When i try to commit a change, it shows the green badge and says it has been pushed, but nothing appears in github. Im using pexpect and I updated config.php as intructed here #47, but i must be missing something else since I was never even asked for a password in the process of setting this all up.
git version 2.10.1
windows.10
pexpect
Wrote commit message foo (bar)
and it actually committed the message foo \(bar\)
.
Environment: Running wernight/codiad
Docker image running Ubuntu.
Hi I tried to pull existing records from bitbucket but its throwing error. Whether it will be supported?
Related to #61, this appears to be the best solution for secure git access via php, that would eliminate the need for expect
/ pexpect
as dependencies. Personally, I'm more comfortable allowing proc_open
compared with exec
/ shell_exec
. I'm not terribly experienced with php but might take a stab at it as well 😄
Cheers
Hi, is it possible to merge the files with this plugin?
Scenario:
User A has edited file X, committed and pushed to server.
User B, hasn't pulled yet, changed the file, committed and tried to push when he gets the error that the push failed.
The output from the command line is the following:
To [email protected]:gitrepo.git
! [rejected] dev -> dev (non-fast-forward)
error: failed to push some refs to '[email protected]:gitrepo.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
$ git pull
U myproject/design/patterns links.txt
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm '
as appropriate to mark resolution, or use 'git commit -a'.
Is it possible to know/identify which files are causing the error and fix them using the plugin?
Many thanks
Hi,
When I add a remote branch as:
ssh://username@localhost/var/repo/location
and attempt to pull from there it crashes Codiad and requires a server restart. Any help?
The reason I'm doing this is the repo I want to eventually push/pull is the production area of the website.
I have the ssh keys setup so I can ssh into the localhost itself on a normal terminal.
Thanks
Hi there!
First of all, I would like to give thanks for this plugin. I have installed it and, after cloning a repo into Codiad and making minor changes to see how it works, I cannot push/pull. This are the steps I have:
www-data
user, in order to enable Codiad to use it. I have checked if Codiad is using this group with whoami
in the terminal plugin.sudo -Hu apache ssh -T [email protected]
in the shell of my machine, and the output is fine (Hi imuguruza! ... )How can I fix Git in Codiad to make push/pulls?
Thanks in advance!
Steps to reproduce:
Is there any way to force it to refresh? I guess it would whether it is watching for file changes on the filesystem or just on-demand by the CodeGit plugin.
Trying to do a pull/push returns:
{"status":"error","message":"Failed to pull repo!"}
Environment:
Using wernight/codiad Docker image
Running inside the Terminal plugin (or directly inside the shell as PHP's user):
$ ssh -T [email protected]
Welcome to GitLab, John Doe!
Running from inside the Terminal plugin a git pull
also works.
This plugins remote info look good.
PHP's logs seem pretty parse about the cause of this issue. I only see:
2016/06/28 22:22:22 [error] 13#0: *469 connect() failed (111: Connection refused) while connecting to upstream, client: ::ffff:10.234.0.2, server: _, request: "GET /plugins/Codiad-CodeGit-master/controller.php?action=status&path=myproject HTTP/1.1", upstream: "fastcgi://[::1]:9000", host: "codiad.example.com", referrer: "http://codiad.example.com/"
Hi.
Git user settings is stored in data/config/git.{user}.php file. My user name is stored escaped like V\u00e1clav Nov\u00e1\u010dek
which means Václav Nováček
and it is correctly set and visible in CodeGit user settings window. When user settings is used for commit, following command (class.git.php:532):
$result = $this->executeCommand('git config user.name "' . $username . '"');
is executed and git stores corrupted name Vclav Novek
without middle-european characters.
The same applies also for commit comments.
git-stat is not floated left so any other things added drop down a line
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.