每次使用gitpython时提示输入用户名和密码

问题描述

嘿,我要设置服务的一部分是从git推送和拉取某些东西,因为该服务应该由多个人使用,我想跟踪谁向gitlab存储库推送了什么内容。我想使用gitpython来实现与gitlab的交互

这样我可以执行以下操作:

df1 <- data.frame(x = 1:5,y = 11:15)  
df2 <- data.frame(x = 1:9,y = 11:19,z = 8:16 )    
df3 <- data.frame(x = 2:5,y = 11:14,z = 3:6,g = 4:7)
save(df1,df2,df3,file = "icon.RData")
rm(df1,df3)

现在,如果我没有使用username:password克隆,当我尝试运行代码时,只会得到以下异常:

def push_to_git(path,commit_msg):
    
    repo = Repo(path)
    repo.git.add(update=True)
    repo.index.commit(commit_msg)
    origin = repo.remote(name='origin')

    # prompt for user and password here

    origin.push()

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)