mac 环境下 安装ga-cmd,命令行自动获取 google authenticator code

来源:互联网 发布:管线三维数据采集 编辑:程序博客网 时间:2024/05/21 19:49

ga-cmd git地址:https://github.com/arcanericky/ga-cmd


1、按readme说明操作:


执行git submoduleupdate时报错:

 fatal: repository 'https://code.google.com/p/google-authenticator/'not found

原因:该地址会自动重定向至https://github.com/google/google-authenticator

解决:修改ga-cmd项目根目录下.git里的配置文件config,将repository地址更新为github地址,如下图:


2、进入src目录执行:


16 character seed为公司堡垒机KEY

执行时报错:


原因:/bin/true is a command that returns 0 (a truthvalue in the shell).

Linux下位于/bin/true

Mac下位于/usr/bin/true,路径不对

解决:


makefile中的/bin/true修改为:



3、重新执行./build.sh key(16位堡垒机key)

最后执行命令即可获得Google AuthenticatorCode


0 0
原创粉丝点击