[英]pygit2 raises KeyError: 'the requested type does not match the type in the ODB'
我正在努力將一些 python2 代碼移植到 python3 - 單一代碼庫。 我在 cpython 2.7 上使用 pygit2 0.28.2,在 cpython3.10 上使用 pygit2 1.9.2,至少現在是這樣。 我從以下位置收到錯誤 (-3): ...並且 payload.chec ...
[英]pygit2 raises KeyError: 'the requested type does not match the type in the ODB'
我正在努力將一些 python2 代碼移植到 python3 - 單一代碼庫。 我在 cpython 2.7 上使用 pygit2 0.28.2,在 cpython3.10 上使用 pygit2 1.9.2,至少現在是這樣。 我從以下位置收到錯誤 (-3): ...並且 payload.chec ...
[英]How can I check if a given file is present in a Github repository using PyGithub?
文件路徑 = repo_name/abc/xyz.yml repo(是 git repo 對象) 我希望能夠通過返回布爾值來檢查 repo 是否包含文件。 就像是: ...
[英]How to make an initial commit using pygit2?
使用pygit2 package 如何在新存儲庫上創建初始提交? 我不斷收到一條錯誤消息,提示找不到“refs/heads/master”。 ...
[英]How get list submodules from git bare repo without create working tree?
如何在不創建工作樹的情況下獲取 git 裸倉庫中的子模塊列表? (使用低級庫 libgit2 或 git 控制台)? ...
[英]How to clone master and checkout another branch in pygit2 without detached HEAD
使用 pygit2 這對我來說很好用: 克隆 repo 的 master 分支 創建一個分支 做一些改變 將分支推送到原點 這對我來說失敗了: 克隆 repo 的 master 分支 簽出現有分支 我總是以分離的 HEAD 結束。 在沒有分離 HEAD 的情況下進行結賬有什么 ...
[英]how to use git pull with GitPython?
我正在嘗試使用 python 從 git 中提取文件,但它不起作用。 下面是我使用的代碼: 它要求進行身份驗證,然后終止。 有人可以在這里幫助我嗎? 這段代碼有什么問題? ...
[英]How to import pygit2 library into AWS lambda python3.8 runtime
我遇到了 AWS lambda function 的問題。 我無法將 pygit2 庫導入我的 function。 我在 4 個不同的運行時環境中進行了嘗試,每個環境都給出了不同的錯誤,這讓我認為庫中而不是我的代碼中存在問題。 這些是我得到的錯誤:github_pull_source 是我的 fun ...
[英]pygit2: How to “git remote set-branches origin remote_branch_name”
標題說明了一切。 我正在使用pygit2並試圖弄清楚如何使用 git cli: git remote set-branches origin remote_branch_name來實現以下目標 ...
[英]AttributeError: '_pygit2.Reference' object has no attribute 'get_object'
我正在嘗試自動執行在我的遙控器中創建和克隆存儲庫的任務,當我運行以下代碼時,似乎我嘗試使用的方法可能已被棄用。 什么是替代方法? Output ...
[英]How to get name current bramch name in a git repository using python
這是使用 ssh 鍵在 git 中獲取當前分支名稱的腳本 錯誤:顯示未找到存儲庫。請幫助獲取 git 存儲庫中的當前分支名稱 ...
[英]Get all the file Contents of a repo at Specific Commit using PyGitHub
我想使用 Python [PyGitHub API] 獲取 repo [已更改和未更改] 中所有文件的文件內容。 但不確定如何實現它。 簡單地說,在歷史記錄中瀏覽該特定提交 id 的 repo。 是否有任何其他 API 來獲取所需的數據? 或者可以用 PyGitHub 本身來完成。 注意:我使用 ...
[英]Pygit2 0.25.0 repository finding problem in windows XP
我正在編寫用於git存儲庫的python程序,它可以在win7上正常工作,但是我也需要該程序在win xp上工作(win xp支持python 3.4,pygit2 0.28不能在win xp上工作(dll導入錯誤)所以我已經安裝了pygit2 0.25.0)我正在使用pyinstaller構建 ...
[英]HEAD detatched from origin/master when merging with pygit2
我正在使用pygit2合並項目的某些分支,但是每當合並它們時,我都會得到以下結果: 在我的代碼中。 當我用“ git status”檢查倉庫時,我發現: 據我所知,我一切都做得很好,所以我無法弄清為什么HEAD分離了。 據我了解,當您檢出特定的提交而不是分支時,HEAD是分離 ...
[英]Pygit2: Need help on how to walk on all commits in all repo's branches
我需要遍歷整個 repo 的分支提交。 我試過這個,但沒有成功。 : 任何幫助將不勝感激,謝謝。 ...
[英]pip requirement based on available OS library version
我正在開發基於pygit2的python包。 pygit2取決於libgit2 。 Ubuntu 18.04的版本為libgit2-2.6 Ubuntu 18.10的版本為libgit2-2.7 在我的requirements.txt / Pipfile中,如果我有"pygi ...
[英]Salt master not able to connect to gitfs remote
我正在嘗試將遠程github存儲庫配置為鹽服務器根目錄,但它無法使發布/私有密鑰對的身份驗證成功。 我也給出了/ etc / salt / master文件中鍵的位置。 以下是我得到的日志: 我已經檢查了密鑰對和到github端點的連接。 我能夠在服務器中手動同步倉庫。 ...
[英]Create, Clone, and Push to GitHub repo using PyGitHub and PyGit2
我如何創建一個新的GitHub存儲庫,克隆它,更改文件,然后使用python和pyGitHub和pyGit2庫將其推回到github? 兩個庫的文檔非常稀疏,幾乎沒有示例。 ...
[英]Installing libgit2 and pygit2 in archlinux docker
嘗試在Docker中安裝libgit2和pygit2。 無論我如何嘗試,都請繼續出錯。 感謝您提供任何幫助 ...
[英]get all repo commits using pygit2 with svn repos
現在,當我想獲取所有提交並將其存儲到數據庫時,我正在使用git svn克隆存儲庫。 為了獲得所有提交,我使用pygit2.Repository但是我看到我只從'/ trunk /'分支收到提交。 如果我在終端中使用git branch -a ,則可以看到所有分支: 當我做gi ...
[英]how to interpret pygit2 status info
我正在使用 pygit2 訪問 repo 的狀態 我似乎無法找到有關如何解釋標志的任何文檔 有人可以指出我正確的方向嗎 ...