Giter Club home page Giter Club logo

kirby-git's People

Contributors

dependabot[bot] avatar hdodov avatar pstaender avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kirby-git's Issues

Unable to install with Kirby v4 via composer

The composer.json in the current release requires "getkirby/cms": "^3.7",, which ^4.0.0 does not satisfy.

Full error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - oblik/kirby-git[1.0.0, ..., 1.1.0] require getkirby/cms ^3.3 -> found getkirby/cms[3.3.0, ..., 3.9.8] but it conflicts with your root composer.json require (^4.0.0).
    - oblik/kirby-git 1.2.0 requires getkirby/cms ^3.4 -> found getkirby/cms[3.4.0, ..., 3.9.8] but it conflicts with your root composer.json require (^4.0.0).
    - oblik/kirby-git 1.3.0 requires getkirby/cms ^3.6 -> found getkirby/cms[3.6.0, ..., 3.9.8] but it conflicts with your root composer.json require (^4.0.0).
    - oblik/kirby-git 1.4.0 requires getkirby/cms ^3.7 -> found getkirby/cms[3.7.0, ..., 3.9.8] but it conflicts with your root composer.json require (^4.0.0).
    - Root composer.json requires oblik/kirby-git * -> satisfiable by oblik/kirby-git[1.0.0, ..., 1.4.0].

(Originally published at: https://srijan.ch/notes/2023-11-28-001)

Add option to specify Git executable

By default, the plugin runs Git commands like this:

exec('git --version');

...which is a problem if there are multiple versions of Git on the system and the wrong one is used. There should be an option like oblik.git.bin that determines the path to the Git executable so that commands can turn to this instead:

exec('/usr/local/bin/git --version');

Run `git fetch` in the background

It would be useful to notify the user of potential updates by running git fetch when the Git tab is opened and then showing something like:

3 commits can be pulled from origin/master

Kirby user with no name -> commit author

Hi,
just realised if no name is definied for a kirby user the commit's author is "oblikweare". I would prefer to just use the email addresse. Or is there a way to define the other?

Permissions error on push not shown in the panel

The AJAX response is this:

To https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/my-repo
    c8dd520..6859a72  master -> master
    error: update_ref failed for ref 'refs/remotes/origin/master': cannot update the ref 'refs/remotes/origin/master': unable to append to '.git/logs/refs/remotes/origin/master': Permission denied

...but nothing is shown in the panel as if the push was successful.

Customize labels

I think it would be awesome if one could easily customize the labels of status etc. on the commit overview. With that, one could set it up for non-technical users to be used.

Add option to switch branches

When running on a staging environment, for example, it could be useful to have the ability to switch between branches and commit to them separately, without having to SSH on the server.

Can’t stage changes with a public folder setup

Leaving this here as a heads up for anyone who might run into the same problem. When adding the plugin to a kirby setup with a public folder, the Add button on the unstaged column does not work, which pretty much breaks the plugin.

To solve this add 'oblik.git.repo' => '../' to your config.php.

.gitignore not being honoured

Hi,

I'm running this plugin along with another plugin for tracking redirects and 404s. This other plugin uses an SQLite DB and I'm trying to add the DB to my .gitignore file on the repo, but kirby-git doesn't seem to be honouring it. The ignore works locally in VSCode, so I know it's not a problem with the file.

Any tips please?

Can't configure the plugin

Hi!

I've tried installing the plugin manually because I'm not sure I can use composer on my shared web hosting service. There is git though (2.24.1).

I've set my config file like this:

    'oblik.git.repo' => 'path-repository',
    'oblik.git.merge' => 'master',
    'oblik.git.hooks' => [
        'site.update:after',
        'page.update:after'
    ],

Capture d’écran 2020-06-06 à 16 09 33

I don't really understand the mistake here. Could you help me understand what's wrong?

Unable to fetch logs on a newly created branch

When you checkout a new branch on the server, e.g. live, but there's no live branch on origin yet, you get the following error in the panel:

fatal: ambiguous argument 'origin/live..live': unknown revision or path not in the working tree.↵Use '--' to separate paths from revisions, like this:↵'git [...] -- [...]'

Poll for git status

When you've left an open browser tab with the Git view open, it can be useful to poll for changes so you don't have to refresh the page.

Changes list broken in Kirby 3.7

When updating to kirby 3.7, the changes list becomes invisible as soon as there are changes.
Not sure what happens here, and don't have any Kirby UI/Vue knowledge to understand what is going wrong.
It looks like its just a change in kirbys vue templating implementation. No errors in console, and the plugin works correctly apart from this visibility issue.

Screenshot 2022-06-30 at 12 12 32

Error when branch name matches folder name

If you have a branch named content, Git confuses it with the content folder. All commands run by the plugin should make use of the -- argument to clearly separate the command options.

html tags in git messages are not encoded

This is a tiny bug. When the commit message is Replaces <em> with <strong> it renders as “Replaces with”.

I will try to fix it when I find the time.

Bildschirm­foto 2023-03-17 um 12 06 18

Screenshot Tower


Bildschirm­foto 2023-03-17 um 12 01 49

Screenshot Git Panel

How can I use kirby-git in bare repositories on a live server?

Hey!

I've setup Kirby Git in my Project.
Now my Deployment Platform only allows me, to have the repo on the server as core.bare = true.
That way, the .git folder is in a different path, not accessible from the served path for the files available on public.
Makes sense obviously.

Now sadly, this way, the Kirby-Git Plugin doesn't seem to work, is there a workaround or a better solution to get this up and running?

I always get this error when I try to implement the status pane: fatal: this operation must be run in a work tree.

Additionally, I get this Error, when I open the "Git" Tab in the Panel:
fatal: ambiguous argument 'origin/live..live': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]'

Anything I can do?
That would be amazing!
Thanks for your work.

Sam

oblik.git.repo produces fatal error

When I customize the repo path it gives me fatal error:
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 12288 bytes) in .../kirby/src/Cms/Core.php on line 348
I just want to only use the content's git repo. So I changed it to 'repo' => kirby()->roots()->content()
The content folder is excluded in the main repo and is a separate repo for its own. I use php 8.1.8 and git 2.37.1.

With the default value as repo it works great.

autocommit changes?

is there a way to autocommit changes and push them. That would be a great and easy backkup.

500 error when visiting plugin page in panel

First off, I'm very excited about the plugin. Thank you for building it! It's so well thought out, and I can't wait to start using it.

Issue: When I visit the plugin page (/panel/git), console shows two 500 errors on the API requests, resulting in a non-working page showing an empty dialog (see screenshots).

About my installation:

  • Kirby 3.6.2
  • PHP 8.1.3
  • HTTPS: off (running on localhost)
  • Debugging: On (error also occurs when debugging is off)
  • Plugins: Only oblik/git (installed via composer)
  • No custom config settings for plugin
  • Git repo/branches set up as outlined in docs, using system git on MacOS

This is the error response when I visit the API routes directly:

{"status":"error","message":"Unauthenticated","code":403,"exception":"Kirby\\Exception\\PermissionException","key":"error.permission","file":"\/kirby\/config\/api\/authentication.php","line":14,"details":[],"route":"git\/status"}

Any advice?

image

image

Single-branch configuration

It'd be useful to be able to pull and push using the same branch. When you work alone, it's harder to produce conflicts and using separate branches could be unnecessary.

Problems to use the API for push in a Hook

HI,
I try to use $git->push()in a hook.

'hook' => [
        'page.*:after' => function($newPage, $oldPage){
            $git = new Git();

            $git->add();
            $git->commit('update from ' . $oldPage->uid() . ' to ' . $newPage->uid());
            $git->push();
        },
]

if I try to save a page I got this message:

The Form could not saved because

Exception: undefined
Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

If i comment $git->push() out, the commitment works without error.
But I lost the push.

Have you an Idea whats going on?

Cheers

Update through composer for Kirby 3.6

Hi,
how can I update kirby-git with the composer for Kirby 3.6?
If I use version "oblik/kirby-git": "^dev-dev", I get error messages.
What version number have I to use in the composer.json for updating?

Cheers

User friendly error messages

This is what the user sees when he has an incompatible Git version:

download

Perhaps a check for git --version can be made when a Git command exits with code !== 0 and return a message that a newer version is needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.