开发者

How to get rid of username confirmation when using Google repo?

I want have a patch run every Monday to get the latest Android source code and have it built. It seems everything goes well except I have to help 'repo' to confirm my username and email when I get the patch run. The patch will be scheduled in midnight so I guess I have no chance to offer my help to confirm it... How could I configure repo to dismiss the step? Otherwise, is there any way to input 'enter' by bash s开发者_高级运维cript once the script gets prompt?


repo simply builds on top of git.

To set your name in git,

git config --global user.name "Your Name"
git config --global user.email you@example.com


I solved this problem by 'expect', here is the script looks like

expect - << EOF
exec repo init -u ssh://${USER}@<your_repo_server>/<your_manifest.git>
exepect “Your name \[Your Name\]:"
send "\r"
expect "Your Email" \[Your@email.com\]:"
send “\r"
expect "is this correct \[y/n\]?"
send "y\r"
EOF
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜