OpenAtomFoundation / SmartIDE

CloudNative IDE - Empower develoeprs with CloudNative technologies, may the force with you!
https://smartide.cn
GNU General Public License v3.0
432 stars 60 forks source link

Remote host mode: sudo: no tty present and no askpass program specifiedProcess exited with status #17

Closed ZZYhho closed 2 years ago

ZZYhho commented 2 years ago
PS D:\bk-test> smartide.exe start --host xxx --username zs --repourl https://github.com/idcf-boat-house/boat-house.git
v0.1.7.1456
2021-12-08 11:01:57.045 INFO  SmartIDE启动中 ...
2021-12-08 11:01:57.050 INFO  读取工作区信息 ...
2021-12-08 11:01:57.052 INFO  检查ssh连接是否正常 xxx ...
2021-12-08 11:01:57.136 INFO  远程主机模式启动中 ...
2021-12-08 11:01:57.137 INFO  连接远程主机  zs@xxx ...
2021-12-08 11:02:00.333 INFO  [Git] 克隆代码库 ...
remote: Enumerating objects: 224, done.
remote: Counting objects: 100% (224/224), done.
remote: Compressing objects: 100% (184/184), done.
Receiving objects: 100% (224/224), 740.12 KiB | 0 bytes/s, done. 0
Resolving deltas: 100% (32/32), done.
2021-12-08 11:02:04.584 INFO  [Git] Git 代码库克隆完成。
2021-12-08 11:02:04.638 INFO  执行 git checkout && git pull
2021-12-08 11:02:07.739 INFO  读取代码库下的配置文件 '~/project/bk-test/.ide/.ide.yaml' ...
2021-12-08 11:02:07.793 INFO  工作区配置改变!
2021-12-08 11:02:09.926 ERROR ; sudo: no tty present and no askpass program specifiedProcess exited with status 1
ZZYhho commented 2 years ago
由于帐号并没有开启免密码导致的 

假设当前帐号为abc

切换到root下  

1    打开sudoers

vi /etc/sudoers

2    添加免密码

abc ALL = NOPASSWD: ALL