Articles of github

Git github不能与谷歌validation器OSX一起工作

所以我有git在我的电脑上运行就好了。 我的密码保存与osxkeychain thingy和一切运行顺利。 今天,我决定我应该是安全的,并在所有支持它的网站上启用Google身份validation器两步身份validation。 有趣的是github支持它,所以我设置了它。 它通过网站界面正常工作。 我继续分支一个我正在做的项目,做一些工作,然后尝试推新的分支。 当我发现我的身份validation不起作用时,一点也​​不奇怪。 我感到惊讶的是,我似乎无法在谷歌上find任何东西来解决我的问题。 我最初的错误是这样的: git push –set-upstream origin binary-dev remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/***/***.git/' 然后我清除我的旧密码的东西,以获得交互式提示: git credential-osxkeychain erase host=github.com protocol=https 这工作摆脱我的旧设置,但现在我得到: git push –set-upstream origin binary-dev Username for 'https://github.com': *** Password for 'https://***@github.com': remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/***/***.git/' 所以git本身似乎并不了解Google的身份validation器。 […]

域名转发不能使用github页面

我有一个自定义域名为blog.tamizhvendan.in github网页上的博客,今天我已经通过更新CNAMEloggingwww.p3programmer.com把它移动到一个新的域名www.p3programmer.com 。 新的域名正常工作。 由于这是一个突破性的改变,我想有一个域名redirect,将旧域名redirect到新域名。 我使用他们的域名转发系统在我的DNS服务器(BigRock)中configuration了相同的function。 之后, tamizhvendan.in正确地redirect到www.p3programmer.com但是blog.tamizhvendan.in导致404在github页。 通过BigRock的文档,对于子域名将被redirect到pathwww.example.com\{subdomain}即在这种情况下,它应该redirect到www.p3programmer.com\blog但它不会redirect。 我在tamizhvendan.in帐户中添加了一个CNAMElogging,其值指向www.p3programmer.com但是我得到了github页面的404页面错误。 这里是我的blog.tamizhvendan.in输出blog.tamizhvendan.in ; <<>> DiG 9.10.1-P2 <<>> blog.tamizhvendan.in +nostats +nocomments +nocmd ;; global options: +cmd ;blog.tamizhvendan.in. IN A blog.tamizhvendan.in. 2658 IN CNAME www.p3programmer.com. www.p3programmer.com. 1818 IN CNAME tamizhvendan.github.io. tamizhvendan.github.io. 427 IN CNAME github.map.fastly.net. github.map.fastly.net. 30 IN A 23.235.44.133 挖掘www.p3programmer.com输出 ;; global options: +cmd ;www.p3programmer.com. IN A […]

从zip提取时,使shell脚本可执行

我有一个从github中拉出来的shell文件,并使用TeamCity构build成zip文件。 它通常被编辑并从Windows机器放入github。 我需要这个shell脚本在解压缩时可执行。 我该怎么做呢? 目前我必须做chmod + x blah.sh

使用特定于主机的声明更改ssh ControlPath

我有一种情况,需要使用两个不同的SSH密钥访问相同的SSH主机(GitHub)。 这是没有问题的,我可以很容易地通过别名主机名来设置它。 当这个configuration与我的SSH多路复用configuration相结合时,问题出现了。 我似乎无法用主机特定的声明覆盖我的默认ControlPath。 也许这只是它的工作方式? 也许这是一个错误? 难道我做错了什么? 顺便说一句,我在Mac 10.7上。 这是我的configuration: Host * ControlMaster auto ControlPath ~/.ssh/connections/ssh-%r@%h:%p Host github.com-X TCPKeepAlive yes ServerAliveInterval 60 ControlPersist 1h Hostname github.com User git IdentityFile ~/.ssh/id_rsa_X IdentitiesOnly yes ControlPath ~/.ssh/connections/ssh-%r@%hX:%p Host github.com TCPKeepAlive yes ServerAliveInterval 60 ControlPersist 1h 我已经修改了一点点,但似乎总是得到Host *声明中指定的ControlPath。 ssh -T [email protected] 使用id_rsa_X以正确的用户身份login,但在此创build域套接字: ~/.ssh/connections/[email protected]:22 而不是: ~/.ssh/connections/[email protected]:22 所以后来当我尝试使用id_rsa发出SSH命令时,由于连接复用,我得到了id_rsa_X用户。 换一种说法: ssh -T […]

使用git repo保持远程服务器的最新状态

所以,我知道git钩子,并将在下一步,但要编写一个简单的bash脚本,通过cron运行,以保持远程服务器上的回购最新。 我想像这样工作: cron执行myupdatescript.sh myupdatescript.sh将: cd进入/ my / sites / staging git pull -q原点高手 如果有 东西被拉,那么: 运行咕噜声来构build源代码 yadda yadda yadda 我目前有这样的工作作为一个cron任务,看起来像: */1 * * * * cd /my/sites/staging && git pull -q origin master && grunt production 我试图避免运行我的咕build生成,如果没有任何改变。 我想这一切都归结为我怎么能告诉如果git拉实际拉什么东西,并使用它作为运行我的咕噜生成的条件。 Ubuntu服务器,密钥安装在github上,所有这些好东西。 谢谢你的帮助!

package.json中的私人github回购打破azure色的网站部署

尝试通过Github在Azure“网站”上部署Express应用程序。 我在package.json依赖项中有一个私有存储库: "dependencies": { "express: "~3.4.0", … "private-repo": "git+ssh://[email protected]:private/repo.git" } 不幸的是,这里是堆栈跟踪: Command: C:\DWASFiles\Sites\website002\VirtualDirectory0\site\deployments\tools\deploy.cmd Handling node.js deployment. KuduSync.NET from: 'C:\DWASFiles\Sites\website002\VirtualDirectory0\site\repository' to: 'C:\DWASFiles\Sites\website002\VirtualDirectory0\site\wwwroot' Copying file: 'package.json' Missing server.js/app.js files, web.config is not generated Node.js versions available on the platform are: 0.10.18, 0.10.5, 0.6.17, 0.6.20, 0.8.19, 0.8.2. Selected node.js version 0.10.18. Use package.json file to choose a different […]

CGI和命令行上的Git Pull有不同的结果

我在GitHub上有一个“推后”webhook,它调用一个CGI脚本来更新一个Jekyll网站。 剧本: user@server [~/_repo]# cat cgi-bin/githook.cgi #!/bin/bash echo Content-type: text/plain echo if [ -z "$HOME" ] ; then HOME=/home/user fi GIT_REPO=$HOME/_repo PUBLIC_WWW=$HOME/public_html pushd $GIT_REPO git pull echo "$HOME/.rvm/bin/ts_jekyll build –source $GIT_REPO –destination $PUBLIC_WWW" $HOME/.rvm/bin/ts_jekyll build –source $GIT_REPO –destination $PUBLIC_WWW popd echo DONE GitHub将脚本的输出保存为: ~/_repo ~/public_html/cgi-bin Updating OLD_COMMIT_SHA..NEW_COMMIT_SHA /home/user/.rvm/bin/ts_jekyll build –source /home/user/_repo/ –destination /home/user/public_html Configuration file: […]

设置Github收到与私人Jenkins和私人回购的webhook

我试图build立一个私人的GitHub项目发送一个post-receive请求到一个私人的Jenkins实例来触发一个项目build立分支推。 使用最新的Jenkins和GitHub插件。 我相信我在Jenkins一方正确地设置了一切,因为当从一个公共服务器发送一个curl请求时: curl http://username:password@ipaddress:port/github-webhook/ 结果是: Stacktrace: net.sf.json.JSONException: null object 这很好,因为JSON有效负载丢失了。 在URI中发送错误的用户名和密码会导致: Exception: Failed to login as username 我把这个解释为一个正确的Jenkinsconfiguration。 这两个请求也会导致Jenkins日志中的条目。 但是,当从上面粘贴完全相同的URI到Github存储库Post-Receive URLs Service Hook中,并单击Test Hook时 ,我的服务器上绝对没有任何事情发生。 Jenkins日志和GitHub钩子在Jenkins项目中没有任何logging说Polling还没有运行。 我已经用尽了想法,不知道如何进一步发展。

错误403当git推(多个github帐户在同一个mac)

我在同一台Mac上有两个GitHub帐户。 并已安装凭证-osxkeychain。 它与我的第一个GitHub帐户正常工作。 但是,如何将第二个帐户添加到钥匙串访问? 如果这是不可能的,我怎样才能注销我的第一个帐户? PS我不能在我的networking上使用SSH密钥。 PS我已经在第二个git config user.email设置了git config user.name & git config user.email 。 当我git push时出现错误403。 Github没有要求我input第二个帐户的密码。 我认为git是用错误的帐户和密码推回购买。

如何做“赤裸裸的域名别名”像支持它的DNS主机?

我的目标是使用GitHub页面,并从CDN中受益 ,而无需使用支持DNS ALIASloggingtypes(或ANAME – 既不是可接受的标准)的第三方DNS主机。 我想知道他们是怎么做的,任何人都可以解释一下吗? 在这里我们有很多关于CNAMElogging的DNS别名的问题,但是在这种情况下,我不能将裸域名CNAMElogging到username.github.io 。 如果我使用Apache或Nginx来实现www.example.com作为GitHub Page的工作,它是否工作,我会打破任何像电子邮件? 阿帕奇 <VirtualHost *:80> ServerName example.com Redirect 301 / http://username.github.io/ </VirtualHost> Nginx的 server { server_name example.com; return 301 http://username.github.io/; } 以上假定www => username.github.io的CNAME和裸域的A Record =>具有上述configuration的我的一台服务器。