我想将Saas Appication的文件保存到我的Google云端硬盘帐户中,我看到的所有示例都是使用oauth2自动生成的,并且需要最终用户自动打开浏览器,我需要从服务器上载文件而没有任何用户互动,将文件直接发送到我的帐户!
我尝试了很多在互联网上找不到成功的教程,主要是官方的
如何以编程方式从服务器中自动备份文件,上传文件并使用API功能(例如共享文件夹等)?
我使用的是Python,lib PyDrive使用了相同的方法来自动化
我已经安装了SCM Sync配置插件(0.0.10)以将我的jenkins设置保存在我的git存储库中.
我已经设置了git url存储库,但插件没有提交/推送,请参阅屏幕截图
我试过了:
~/.ssh/id_rsa与chmod 600id_rsa和.ssh目录.ssh目录具有权限700jenkinsOS用户做了同样的事情插件状态消息的屏幕截图
如你所见,插件将所有文件复制到我想象这个文件夹应该是git存储库的文件夹中.
插件网页(https://wiki.jenkins-ci.org/display/JENKINS/SCM+Sync+configuration+plugin)我们可以看到相同的"错误"和消息To use a Git server with SSH, you have to accept the server SSH key before using the plugin (same for using Git in Jenkins jobs).,好的,但我想我已经做过了.
该插件的故障排除说它~/.ssh/用于提交设置
https://wiki.jenkins-ci.org/display/JENKINS/ScmSyncConfig+Troubleshootings
我非常喜欢插件的想法,我想使用它,但我不能.
我在AWS上使用ubuntu 14.04,我的git存储库是bitbucket.
怎么了?
我需要传递一个方法列表,用"闭包方式"在类中执行,请参阅下面的代码
class A{
def m1(){
println "Method1"
}
def m2(){
println "Method1"
}
def commands = { closure->
println "before"
closure.call()
println "after"
}
}
A a = new A()
a.commands{
println "before execute method m1"
m1() //A need to execute m1 method of the class A
println "after execute method m1"
}
Run Code Online (Sandbox Code Playgroud)
当我评论m1()输出是
before
before execute method m1
after execute method m1
after
Run Code Online (Sandbox Code Playgroud)
否则抛出异常 MissingMethodException: No signature of method for method m1()
因此,它不承认该m1()方法作为方法class A