简体   繁体   中英

how do I pull my git user mail user and password to send email from my local repository?

How can I pull git users email login info from my git local repository using python to send email with my custom git command ?

I want to do something like git send-email does, it sends email without asking for password.

you can get email by doing something like this:

with open('.gitconfig') as f:
    text=f.readlines()
for line in text:
    if 'email' in line:
        print line[line.index('=')+2:]

git send-email should work without passwords provided you have the ssh keys

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM