我似乎找不到任何有关如何使用gitlab-shell的信息或示例。我最初的方法只是尝试从开发箱到服务器的SSH会话。我收到了类似the one from this post的错误响应:
jacob @ mypc:ssh git@git.example.com:
PTY分配请求在通道0上失败
欢迎来到Jacob的GitLab!
与git.example.com的连接已关闭。
通过添加public class MqttEventReceiver implements Runnable {
private static final String CLIENT_ID = UUID.randomUUID().toString();
private IMqttAsyncClient client = null;
public MqttEventReceiver(String apiStreamingUri, String
connectionAccessToken) {
}
private MqttCallback mqttCallback = new MqttCallback() {
public void messageArrived(String topic, MqttMessage message) throws Exception {
String incomingMsg = new String(message.getPayload());
LOG.info("Message: ", new String(payload));
}
public void deliveryComplete(IMqttDeliveryToken arg0) {
// TODO Auto-generated method stub
}
public void connectionLost(Throwable arg0) {
// TODO Auto-generated method stub
}
};
@Override
public void run() {
String tmpDir = System.getProperty("java.io.tmpdir");
MqttDefaultFilePersistence dataStore = new MqttDefaultFilePersistence(tmpDir);
//make the connect request. this request establishes a permanent connection
MqttConnectOptions options = new MqttConnectOptions();
options.setAutomaticReconnect(true);
options.setCleanSession(true);
options.setConnectionTimeout(10);
options.setUserName("authorization");
options.setPassword(connectionAccessToken.toCharArray());
Long threadId = successfullyConnected();
client = new MqttAsyncClient(apiStreamingUri, CLIENT_ID, dataStore);
client.setCallback(mqttCallback);
client.connect(options).waitForCompletion();
client.subscribe("topic", 1).waitForCompletion();
}
}
参数like this user does减轻了错误:
jacob @ mypc:ssh git@git.example.com:
欢迎来到GitLab,雅各布!
但是,正如使用-T
参数所期望的那样,我没有看到shell。在这一点上,我不确定该怎么办。 应该如何使用gitlab-shell?