每次启动新构建时,RSA指纹都会更改 [英] RSA fingerprint change every time a new build is started
问题描述
我有一个CI管道来构建我的android应用程序,并使用gitlab管道运行检测测试。我的gitlabRunner是一台ubuntu 16.04机器,在docker容器中运行每个构建。我有一个通过USB连接到gitlab运行程序的物理android设备。
I have a CI pipeline to build my android app and run instrumented test using gitlab pipelines. My gitlab runner is a ubuntu 16.04 machine running each build in a docker container. I have a physical android device connected via USB to my gitlab runner.
最近,每次触发新的构建时,系统都会提示我允许USB的RSA指纹我的Android目标上的设备。问题是指纹在每次构建时都会改变。
Recently, every time a new build is triggered, I am prompted to allow the RSA fingerprint for the USB device on my android target. The problem is that the fingerprint changes with every build.
我怀疑这是因为每次构建开始都会创建一个新容器。
I suspect that this is because a new container is created every time a build start.
如何自动接受新指纹或防止指纹更改?
How can I automatically accept the new fingerprint or prevent the fingerprint from changing?
推荐答案
制作 $ HOME / .android / adbkey
和 $ HOME / .android / adbkey.pub
通过映射文件夹或在每个容器实例内重新创建文件,在运行之间保持持久。
Make contents of $HOME/.android/adbkey
and $HOME/.android/adbkey.pub
persistent between the runs by mapping the folder or just re-creating the files inside every container instance.
这篇关于每次启动新构建时,RSA指纹都会更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!