alberthier / git-webui Goto Github PK
View Code? Open in Web Editor NEWA standalone local web based user interface for git repositories
License: Apache License 2.0
A standalone local web based user interface for git repositories
License: Apache License 2.0
git-webui/src/libexec/git-core/git-webui
Line 145 in dee7c19
You can spoof the localhost hostname from any system able to connect to gitweb and by this code anyone able to access webui by the hostname "localhost" have writeaccess.
Curl Example:
curl 'http://192.168.X.X:8000/viewonly' -H "Host: localhost" -> 0
Also accessing localhost by another Hostname results in no write access
curl 'http://localhost:8000/viewonly' -H "Host: exthost" -> 1
Hi there,
I love this tool as it is clear and fast. It's especially helpful if you want to focus only on changed files.
Just not sure about the order of the columns for the columns at the lower half. I think normally we start from the working copy, stage them to the staging area and finally commit or amend them to solid commits. Therefore it feels a little bit confusing to have the staging area on right and you will need to track from left to very right end and jump back to middle for the commit message.
Is there a purpose for this design?
Thanks
Looks like when you launch git webui
it gives remote access to the repo to the world. Would be nice to have an option (preferably in the UI itself) to disable it. I'd go as far as disabling it by default.
The following error appears when starting git-webui:
Checking for update...
You are not currently on a branch.
Please specify which branch you want to rebase against.
See git-pull(1) for details.
git pull <remote> <branch>
Checking for update...
This repeats over and over again, without starting git-webui. I made sure both the repo I want to visualize, and the git-webui repo are on the origin/master branch.
Steps to reproduce:
This also happens when only cloning the repo, and directly running the git-webui executable under ./release/libexec/git-core/git-webui
I have pull.rebase true
as a global config, but I also tried to disable it and the result didn't change.
Thanks!
I am curious if you would be interested in a templating solution as opposed to manually constructing the DOM using strings in the js, which is somewhat cumbersome.
I would be willing to contribute in this regard, but firstly wanted to discuss about about your opinion/preferences.
No clear way (command or otherwise) to close down server?
Hi,
Can i use push and pull (to github for exemble) with web interface ?
When there is a conflict, have you got a diff view for resolve this conflict?
Good job :-)
Thank you
Cool! Perhaps you'd like to consider integrating it with the git-deps
tool I just announced?
Hi,
Just wanted to know if there's a shortcut to refresh the staging area when viewing the workspace. I'm currently doing a full Ctrl+R but it seems like overkill, given that I just want to see the updated changes in the staging area.
And congrats for your work!
Is there an option to check out a different branch from the web ui?
Hi -- great work!
I just submitted a formula for Homebrew but apparently they only accept stable, versioned releases for the package tarballs. Would it be possible to get a versioned, tagged release so we can get the brew folks to accept the PR?
Thanks again.
Below is the traceback when I try to use git webui
in Chinese Windows system with Python 2.7.
The repo path itself doesn't contain any non-ascii characters.
Traceback (most recent call last):
File "C:\Python27\lib\SocketServer.py", line 295, in _handle_request_noblock
self.process_request(request, client_address)
File "C:\Python27\lib\SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Python27\lib\SocketServer.py", line 649, in __init__
self.handle()
File "C:\Python27\lib\BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "C:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
method()
File "C:/Users/n3132/.git-webui/release/libexec/git-core/git-webui", line 106, in do_GET
self.send_text(200, codecs.encode(wc, "utf-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb9 in position 4: ordinal not in range(128)
The packaging can be improve with distutils (https://docs.python.org/2/distutils/setupscript.html). With that git-webui can be upload on pip and the linux distrubtion packager can easely create package.
https://github.com/alberthier/git-webui/blob/master/release/libexec/git-core/git-webui#L143
There check for SERVER host, but not client and coz of it, this feature does not work completely
First of all thank you for this amazing project! I'm on a hunt for a great cross platform (mainly OS X and Linux) Git GUI.
I really like the UX of git-webui and there's only one thing I'm missing from it: a bookmarking interface. Something similar to SourceTree's repository bookmark list window - where you can add new repositories to your list, check the status of all of your bookmarked repositories and open any with just a click.
I think this would make managing git repositories a lot easier (I have about 30-40 repos in my SourceTree bookmarks).
OS:CentOS6.9
git version 2.9.3
I have installed the program with
wget -O - https://raw.githubusercontent.com/alberthier/git-webui/master/install/installer.sh | bash
then cd to my local gitclone, execute git webui
and it reported this
it seems that the webui can not read some config, so i check the .gitconfig
so how to solve this?
Is this no longer maintained?
Is it because of an alternative open source solution?
I want to run this gui in port 9000, how do I change it
Perfect WebUI, but I want an option to delete a branch.
I am trying it with my romw314/chess-no-25
repo.
assume now in 'master' branch, i had opened aaa.h in the tree window. after that i had changed branch to 'another-branch', but aaa.h opened in tree window doesn't changed.
Hi,
I just tried out your project, and its fails when looking for the master
branch:
fatal: bad revision '�[1;33mmaster�[m'
These are ANSI Color codes, so I guess the Python script uses the direct calls to the git
command line and parses the output (instead of relying on the Python git API), and in my case I have git configured to use colors.
The ~/.gitconfig
line was:
[color]
# ui = true # <-- this works
ui = always # <-- this fails
By changing ui = always
to ui = true
, the issue is resolved and git-webui
works as expected (it's pretty! well done! 👏)
However, I suggest that you append a -c color.ui=false
to each call to any git
command in the Python script.
It ensures that git-webui
works no matter the user's configuration regarding colors.
(See this PR: #33)
$ git webui
Traceback (most recent call last):
File "C:/Users/sigod/.git-webui/release/libexec/git-core/git-webui", line 280, in <module>
auto_update()
File "C:/Users/sigod/.git-webui/release/libexec/git-core/git-webui", line 227, in auto_update
delta = datetime.datetime.now() - datetime.datetime.fromtimestamp(fetch_head_mtime)
OSError: [Errno 22] Invalid argument
Tried on a number of projects. With autoupdate
set to both true
and false
. Also, tried removing autoupdate
to no avail.
Windows 7, x64
git version 2.8.1.windows.1
Python 3.6.0
It works pretty good on one of my computer, but keep getting localhost contacted. Waiting for reply...
on another one. Any suggestions?
I was looking to spin up a quick webserver for my backup git remote the other day. I stumbled on this project from Stackoverflow, and was excited to see how easy it was to get it running. However, I can't seem to get the application to work with bare repositories.
As detailed in the git man
pages:
--bare
Create a bare repository. If GIT_DIR environment is not set, it is set to the current working directory.Source: Git - git-init Documentation
you can have --bare
repos on a remote git
host just fine. In fact, that's how the server documentation for git
has you configure the repositories.
Here's the workflow I've been trying:
# I'll stand up a full example
mkdir ~/git
# Simple root for all the git stuff.
cd ~/git
# Create a folder for my bare repos
mkdir ./src
# And setup my "bare" repo I push to on this server
mkdir ./src/project.git
cd ./src/project.git
git init --bare
#####
# At this point, I am pushing / pulling from it like a standard git remote.
#####
# I head back to my git root on my server, to prepare for the git-webui install
cd ~/git
# So I push some code up to it, and go back to the server to try git-webui out.
# I clone the project, following the manual instructions from the README
git clone https://github.com/alberthier/git-webui.git ./git-webui
git config --global alias.webui \!$PWD/git-webui/release/libexec/git-core/git-webui
git config --global webui.autoupdate true
#####
# And now we try to run git-webui
#####
# I now then try to run git-webui:
cd ~/git/src/project.git
git webui
# At this point I *EXPECTED* the git-webui to spin up, and have a webserver ready to go.
# My *ACTUAL* result was:
No git repository found
I expected git webui
inside the --bare
git
repository to work, and have a web server up and running that I could use.
I just get an error message of:
No git repository found
I was unable to find any known workarounds. The argument --repo-root REPO_ROOT
was also unable to start the server, even if given the following values:
git webui --repo-root /full/path/to/git/src/project.git
git webui --repo-root ~/git/src/project.git
cd ~/git ; git webui --repo-root ./src/project.git
cd ~/git/src ; git webui --repo-root ./project.git
cd ~/git/src/project.git ; git webui --repo-root .
Program | Version |
---|---|
Operating System |
macOS High Sierra - Version 10.13.5 |
git |
git version 2.17.1 |
git-webui revision cloned |
dee7c192b2ec063cf638c3ec6e99589812b9d231 |
Hi!
I've just installed git-webui and followed the first basic instruction, it looks great but the first thing I notice is that it doesn't highlight code (at least python) syntax... isn't code syntax highlighting supported or am I missing something?
Thanks a lot.
Best regards
Manuele
No matter the port, I always get:
Traceback (most recent call last):
File "/home/francois/.git-webui/release/libexec/git-core/git-webui", line 317, in <module>
httpd = HTTPServerIPng((host, port), WebUiRequestHandler)
File "/home/francois/.git-webui/release/libexec/git-core/git-webui", line 55, in __init__
0, 0, socket.IPPROTO_TCP)[0]
gaierror: [Errno -2] Name or service not known
hi, when you want to view a xml file content the code is not show.
When I click a commit which has a long file, iceweasel browser freezes. It happens when click just that commit.
By the way file is a bundle.js which comes from webpack module
It'll be great if the server can support https!
It would be a cherry on the (lovely) cake!
While I was gathering related information to report issue #45 , I quickly discovered that git-webui
has no easy way to get version information for reporting purposes!
Here's what I tried:
# I head back to my git root on my server, to prepare for the git-webui install
cd ~/git
# I clone the project, following the manual instructions from the README
git clone https://github.com/alberthier/git-webui.git ./git-webui
git config --global alias.webui \!$PWD/git-webui/release/libexec/git-core/git-webui
git config --global webui.autoupdate true
#####
# And now we try to determine what version I am running without using git directly
#####
git webui --version
# At this point I expected a version number, or something I can use to reference my install.
# My *ACTUAL* result was:
usage: git-webui [-h] [--port PORT] [--repo-root REPO_ROOT]
[--allow-hosts ALLOW_HOSTS] [--no-browser] [--host HOST]
git-webui: error: unrecognized arguments: --version
I expected git-webui
to be able to report some type of version number to me for issue / bug reporting.
usage: git-webui [-h] [--port PORT] [--repo-root REPO_ROOT]
[--allow-hosts ALLOW_HOSTS] [--no-browser] [--host HOST]
git-webui: error: unrecognized arguments: --version
I could manually go get version info by using git
directly:
cd ~/git/git-webui
# Allowing me to get the revision and commit information.
git log -n 1
commit dee7c192b2ec063cf638c3ec6e99589812b9d231
Author: Éric ALBER <REDACTED>
Date: Fri Nov 10 01:50:20 2017 +0100
fix error
Otherwise, I didn't see anything when browsing the actual source code here either that would easily allow for version reporting.
Port 8000 is already in use, trying another one
Serving at http://localhost:8001
127.0.0.1 - - [03/May/2017 15:56:48] code 404, message File not found
127.0.0.1 - - [03/May/2017 15:56:48] "GET /dashboard/ HTTP/1.1" 404 -
Hi, really nice tool ! Thanks :)
Setup and initials configurations are working great.
Only thing, I cannot success to pull from my local machine onto my server.
On "git pull http//my_ip:8000/", GIT answer that repo dont exist or is not a repo.
But i can access the interface using http//my_ip:8000/. Any thing i've missed ?
thx a lot !!
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.