Skip to main content

All Questions

Tagged with
0 votes
0 answers
139 views

Clone ssh git repositories using python 3

I have this Python Script that clones a list of length n of repositories using ssh. import pandas as pd import time import git import sys import os counter = 0 #excel reader resources = pd....
CamiCode's user avatar
3 votes
1 answer
554 views

How to fetch an orphaned commit?

tl;dr: I have a repository cloned but cannot see an orphaned commit locally. How can I get that commit if it did not come with the repo? Details: I am trying to get the contents of a specific file on ...
smgtkn's user avatar
  • 140
0 votes
1 answer
608 views

Why latest commit date is not working in Github workflow?

This code is used to get the latest commit date of a GitHub file in a folder. This is working in my local machine but not working in Github action. In the Github action, it's giving the same date for ...
Mohamed Shakib's user avatar
0 votes
1 answer
928 views

Why I get different time zone in PostgreSQL [closed]

I am extracting data from GitHub into my database (PostgreSQL) using git in python. I tried to extract DateTime by using committed_datetime and insert this data into my database; what happens that I ...
waled's user avatar
  • 3
0 votes
0 answers
1k views

AttributeError: 'Repo' object has no attribute 'create_pull'

I'm currently running the following python script. The intention is to be able to automatically create a PR. if new_repo != None: #if there are files within the repo current = new_repo....
hachemon's user avatar
  • 158
4 votes
0 answers
1k views

gitpython: How to authenticate as a Github app?

When I do remote = f"https://{username}:{password}@github.com/user/repo" git.Repo.clone_from(remote, 'repo') I get to clone the repository with my personal credentials. But if I try an app ...
Raphael's user avatar
  • 1,730
1 vote
1 answer
2k views

getting difference of commits between two branches using gitpython

What I want to achieve can be done using command line git as follows git log stage..develop commit ea31b4f01f02af91f31.....b34895e1c825 (origin/develop, develop) Author: author <[email protected]&...
codeaprendiz's user avatar
  • 3,215
1 vote
0 answers
876 views

Clone a specific directory from git repo using Git-Python

My git repo is of more than 2GB in size. I need to clone this repo locally via python and do some updates to it. It is just enough if I clone a particular directory in it. How to accomplish this with ...
Arunachalam RM's user avatar
6 votes
0 answers
2k views

How to commit and push files using python library GitPython

Requirement: Commit and push files to GitHub repository from a python script. The credentials should be included in the script. Issue: If credentials are provided in the script the commit operation is ...
Amith Chowdri's user avatar
15 votes
2 answers
13k views

How do I use a GitHub access token with GitPython?

I am trying to write a python script that when run, will push files to one of my GitHub repositories. I'm using the package GitPython. I want to use an access token to log in into my GitHub account (...
polk54's user avatar
  • 151
3 votes
1 answer
6k views

Want to check if repository exists and if it's public (gitpython)

Using Python and GitPython, with a list of git repositories from different users, I need to check if the repository exists and if it is public. With that in mind and thinking of GitHub, if it asks ...
iperetta's user avatar
  • 617
1 vote
1 answer
3k views

How to checkout and merge branches to master - GITPYTHON

I need to merge all my branches to the master using python. branch local path,buildno getting via environment variables. I have the following code to checkout each branch and merge to master. but it ...
Tharanga Abeyseela's user avatar
1 vote
1 answer
882 views

I see scapy ipsec.py python code in GitHub: how do I install and use it?

There is a python module to generate IPSec packets using scapy in GitHub, but that file is not in its own .git extension to download. Please find the link for the code:https://github.com/secdev/...
Vinayak Hosamani's user avatar
14 votes
3 answers
24k views

How to create a Git Pull Request in GitPython

I am trying to use python for my jenkins job, this job downloads and refreshes a line in the project then commits and creates a pull request, I am trying read the documentation for GitPython as hard ...
Shek's user avatar
  • 1,613
1 vote
1 answer
4k views

Git pull using GitPython + SSH keys doesn't work

I am trying to pull a repo from my Github account using GitPython. This is after (1) I performed a git clone already from the command line. (2) Generated new SSH keys using ssh-keygen -t rsa -b ...
DancingJohn's user avatar

15 30 50 per page