小编Gab*_*ann的帖子

Composer下载私有GitHub存储库

我无法下载与作曲家的github私人回购

php composer.phar update 
Run Code Online (Sandbox Code Playgroud)

我收到以下错误

无法下载" https://api.github.com/repos/company/private1 "文件(未找到HTTP/1.1 404)

但我可以轻松下载这些私人回购使用 git clone

Composer.json

"repositories": [
    {
        "type": "vcs",
        "url": "git@github.com:company/private1.git",
        "options": {
            "ssh2": {
                "username": "githubusername",
                "pubkey_file": "/home/username/.ssh/id_rsa.pub",
                "privkey_file": "/home/username/.ssh/id_rsa"
            }
        }
    },
    {
        "type": "vcs",
        "url": "git@github.com:company/private2.git",
        "options": {
            "ssh2": {
                "username": "githubusername",
                "pubkey_file": "/home/username/.ssh/id_rsa.pub",
                "privkey_file": "/home/username/.ssh/id_rsa"
            }
        }
    }
],

"require": {
    "php": ">=5.4.3",
    "zendframework/zendframework": ">2.1.3",
    "doctrine/mongodb-odm": "dev-master",
    "doctrine/doctrine-mongo-odm-module": "dev-master",
    "company/private": "dev-master",
    "company/private2": "dev-master"
}
Run Code Online (Sandbox Code Playgroud)

我试过这个,但它不起作用

SSH2 PECL也启用了.

我还创建了配置文件 vim ~/home/.ssh/config

具有以下细节

host www.github.com
User githubusername …
Run Code Online (Sandbox Code Playgroud)

php git ssh github composer-php

5
推荐指数
1
解决办法
1952
查看次数

mysql:无法修改或更新日期值 0000-00-00 的列

我有两个问题:

  1. 为什么0000-00-00在表定义中将其设置为非空时插入错误日期时,mysql 无法通知错误..?

示例架构:这里

现在,如果将截止日期更改为1970-01-01它会显示错误

0000-00-00第 1 行的 Duedate 列的日期值不正确

update my_list set duedate = '1970-01-01' where duedate = '0000-00-00';
Run Code Online (Sandbox Code Playgroud)

我试图修改该列,但它仍然显示相同的错误

ALTER TABLE `my_list` modify `duedate` date NULL;
ALTER TABLE  `my_list` MODIFY  `duedate` DATE NOT NULL DEFAULT '1970-01-01';
Run Code Online (Sandbox Code Playgroud)
  1. 如何将截止日期更改为1970-01-01for 0000-00-00

我从客户端获得了数据库,所以不幸的是在 my.cnf 文件上工作。

更多信息:

MYSQL 版本:5.5

编辑:这是有效的

update my_list set duedate = '1970-01-01' where id = 16; 
Run Code Online (Sandbox Code Playgroud)

但不是

update my_list set duedate = '1970-01-01' where duedate = '0000-00-00';
Run Code Online (Sandbox Code Playgroud)

mysql

2
推荐指数
1
解决办法
3145
查看次数

标签 统计

composer-php ×1

git ×1

github ×1

mysql ×1

php ×1

ssh ×1