libgit2 / libgit2/pygit2

GitError: local push doesn't (yet) support pushing to non-bare repos.

オープン
#1,306 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
1.7k
フォーク
408
平均マージ
2日 57分
マージ済み PR(30日)
7

説明

I have changed a submodule and want to update the repository of this submodule.

    remote = 'origin'
    remote = repo.remotes[remote] 
    repo.config.get_global_config()['safe.directory'] = remote.url  
    res = remote.push(['refs/heads/temp'])

But I get an error: _pygit2.GitError: local push doesn't (yet) support pushing to non-bare repos.
At the same time, the console cmd is working: git push origin temp
How can I solve this problem via pygit2?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、non-bare repository に対する remote.push(['refs/heads/temp']) の呼び出しを再現し、動作する git push origin temp コマンドと比較します。non-bare repository へのローカル push がサポートされていないと pygit2 が報告する箇所を追跡します。このケースでサポートされる動作、または文書化された pygit2 の解決策を確立できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
git, python
領域
tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。