简体   繁体   English

Shell脚本执行git pull。 密码问题

[英]shell script to perform git pull. Problems with password

I wrote a shell script to do project releasing with Git which would be integrated n bamboo, in the shell script I first cd to the Git working copy and then do git pull origin master. 我写了一个shell脚本来与Git一起发布项目,该项目将集成到竹子中,在该shell脚本中,我首先CD到Git工作副本,然后执行git pull origin master。 But it prompts me for password: git@localhost's password:Any idea on how to solve this? 但这提示我输入密码:git @ localhost的密码:关于如何解决此问题的任何想法? I already tried using ssh-agent but for some reason ssh-add command does nothing. 我已经尝试过使用ssh-agent,但是由于某种原因ssh-add命令什么也不做。

I suggest using ssh keys with ssh-agent. 我建议在ssh-agent中使用ssh密钥。 I successfully setup my ssh key and ssh-agent configurations using information on this page . 我已使用此页面上的信息成功设置了ssh密钥和ssh-agent配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 不能推或拉。 (Git / SourceTree) - Can't push or pull. (Git / SourceTree) 在shell脚本中使用Git Pull命令,而无需手动输入密码? - Git Pull command in shell script without having to enter password manually? 在shell脚本中指示git pull的密码,没有ssh? - indicate a password for git pull in shell script, without ssh? 输入用于git pull in脚本的密码 - Enter password for git pull in script 如何制作一个脚本来执行git pull? - How to make a script to perform git pull? 忽略Git提交时提交。 跳过提交并从最新提交继续 - Ignore Git commits when pull. Skip commits and continue from latest commit 我可以在没有密码提示的情况下执行`git pull`但是使用密码提示执行`git push`吗? - Can I perform `git pull` without password prompt but `git push` with password prompt? git显示我删除了我的repo中的所有文件,并在我执行git pull之后将它们暂存。 为什么? - git shows that I deleted all the files in my repo and staged them for commit after I did a git pull. Why? 通过ssh执行git pull的脚本并绕过密码短语要求? - Script to perform a git pull via ssh and bypass passphrase requirements? 使用密码连接到 SSH 并使用 shell 脚本执行一些命令? - Connect to SSH using password and Perform Some commands using shell script?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM