我正在尝试在github repo上连接jenkins.
当我指定Repo URL时jenkins返回以下错误消息:
无法连接到存储库:命令"git ls-remote -h git@github.com:adolfosrs/jenkins-test.git HEAD"返回状态码128:stdout:stderr:主机密钥验证失败.致命:无法从远程存储库读取.请确保您具有正确的访问权限并且存储库存在.
使用HTTPS时:// Url jenkins返回:
无法连接到存储库:无法连接到 https://github.com/adolfosrs/jenkins-test.git(status = 407)
我可以在jenkins运行的同一台机器上成功克隆repo,我也运行git ls-remote -h git@github.com:adolfosrs/jenkins-test.git HEAD命令.所以我在github上有正确的SSH.
我使用匿名身份验证允许我的用户无需登录即可使用该应用.但是,Firebase似乎无限期地保留这些匿名用户ID.有没有办法自动清除这些或设置某种过期规则?我不希望这些一次性使用ID永远存在,并使来自提供商的实际用户数据混乱.
我正在为iOS开发一个用户应该使用facebook登录的应用程序.所以我正在尝试获取用户个人资料图片,但以下代码正在返回"unsupported URL"
FBRequestConnection.startWithGraphPath("\(userID)/picture?type=large&access_token=207613839327374|BgKi3AePtvg1oDO8GTbWqqLE_SM", completionHandler: { (connection, result, error) -> Void in
if (error? != nil){
NSLog("error = \(error)")
}else{
println(result)
}
})
Run Code Online (Sandbox Code Playgroud)
以下更改:
FBRequestConnection.startWithGraphPath("\(userID)/picture?type=large", completionHandler: { (connection, result, error) -> Void in
if (error? != nil){
NSLog("error = \(error)")
}else{
println(result)
}
})
Run Code Online (Sandbox Code Playgroud)
回来了:
error = Error Domain=com.facebook.sdk Code=6 "Response is a non-text MIME type; endpoints that return images and other binary data should be fetched using NSURLRequest and NSURLConnection" UserInfo=0x786d4790
Run Code Online (Sandbox Code Playgroud) System.out.println(ref.child("mostafa_farahat22@yahoo.com").child("_email"));
Run Code Online (Sandbox Code Playgroud)
*我试图得到一个孩子的价值,但所有时间我得到的值的URL如何获得此URL的值,因为我尝试这个代码但它得到我想要获得_email值的URLi.
我是FIrebase的新手,我有两个可能连接的问题.第一个是保存我的事件列表.
//creating event
TVEvent tvEvent = new TVEvent(etTitle.getText().toString());
User host = ResourceManager.getUser();
String date = etDate.getText().toString();
String location = etLocation.getText().toString();
TVSet tvset = ResourceManager.getUser().getTvSets().get(0);
Event ev = new Event(tvEvent, host, date, location, tvset);
ResourceManager.addEvent(ev);
mDatabase.child("events").child(host.getId()).setValue(ResourceManager.getEvents()); //getEvents() returns a list of events
Run Code Online (Sandbox Code Playgroud)
问题是tvevent和tv set具有比这些更多的属性.当我调试以找出为什么tvevent创建时具有所有属性,这有点奇怪.但是现在,我不知道这是否是一个问题,因为我无法从数据库中检索tvset和tvevent.当我执行以下操作时,我得到null.
mDatabase.child("events").addListenerForSingleValueEvent(
new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
System.out.println("Cheking for events");
//GenericTypeIndicator<List<Event>> t = new GenericTypeIndicator<List<Event>>() {};
//List<Event> e = dataSnapshot.getValue(t);
for (DataSnapshot messageSnapshot: dataSnapshot.getChildren()) {
GenericTypeIndicator<List<Event>> t = new GenericTypeIndicator<List<Event>>() {};
List<Event> list …Run Code Online (Sandbox Code Playgroud) 当我的服务器以状态代码304响应时,我有一些用户无法访问我的angularjs应用程序上的某些模板.Angularjs正在记录[$compile:tpload],如下所示,视图不会显示给用户.因此,某种角度不会从缓存中获取视图.问题似乎非常间歇性地发生,并且在干净的浏览器缓存+页面刷新之后页面再次开始正常工作.
我用ui-router v0.3.2运行Angularjs v1.6.6并且我在firebase托管上托管我的静态文件.它是在最新版本上修复的吗?否则,我该如何处理这个案子呢?
[$ compile:tpload] http://errors.angularjs.org/1.6.6/$compile/tpload?p0=%2Fjs%2Ftemplate1%template1.html&p1=304
可能是未处理的拒绝:{"data":"","status":304,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam" : "回调", "缓存":{}, "头":{ "接受": "text/html的"}, "URL": "/ p/p.html"}, "状态文本": ""," xhrStatus ":" 完成"}
使用LogRocket捕获请求/响应
URL: "https://url.com/js/p/a/template.html"
method: "GET"
status: 304
duration: "00:00.061"
REQUEST
headers
Accept: "application/json, text/plain, */*"
body: null
credentials: ""
mode: ""
referrer: ""
RESPONSE
headers
cache-control: "max-age=3600"
date: "Sat, 15 Sep 2018 20:03:12 GMT"
etag: ""f166a7577a895x3f7dcc5accae97dcba""
expires: "Sat, 15 Sep 2018 17:45:33 GMT"
vary: "Accept-Encoding"
via: "1.1 varnish" …Run Code Online (Sandbox Code Playgroud) http-status-code-304 angularjs firebase angular-ui-router firebase-hosting
我正在尝试从当前登录的用户中检索特定数据.我的数据库中的数据如下所示:

例如,我想抓取full_name并将其保存在变量userName中.以下是我用来获取数据的方法
ref.queryOrderedByChild("full_name").queryEqualToValue("userIdentifier").observeSingleEventOfType(.ChildAdded, withBlock: { snapshot in
print(snapshot.value)
// let userName = snapshot.value["full_name"] as! String
})
Run Code Online (Sandbox Code Playgroud)
不幸的是,这是我的控制台打印.

我将不胜感激任何帮助:)谢谢!
我在打字时搜索用户.但最终它会返回每个用户.我不知道为什么会发生这种情况.好像没问题
class func findUsers(text: String)->[User]{
let user = User()
var users = [User]()
ref.child("Users").queryOrderedByChild("name").queryStartingAtValue(text).observeEventType(.Value, withBlock: { snapshot in
for u in snapshot.children{
user.name = u.value!["name"] as? String
user.surname = u.value!["surname"] as? String
user.email = u.value!["email"] as? String
user.score = u.value!["score"] as? Int
user.status = u.value!["status"] as? Int
user.id = u.value!["id"] as? String
user.pin = u.value!["pin"] as? String
users.append(user)
print(user.name)
}
})
print("users:", users)
return users
}
Run Code Online (Sandbox Code Playgroud) 给定一个字符串我想计算len = 5的子串数.
例如:输入:"ABCDEFG"输出:3
我不确定在python中最简单快捷的方法是什么.任何的想法?
更新:
我只想计算不同的子串.
输入:"AAAAAA"子串:2次"AAAAA"输出:1