GVKun编程网logo

Github报错——unable to access ‘https://github.com/.git/‘: Operation timed out after 300016...

7

以上就是给各位分享Github报错——unabletoaccess‘https://github.com/.git/‘:Operationtimedoutafter300016...,同时本文还将给你

以上就是给各位分享Github报错——unable to access ‘https://github.com/.git/‘: Operation timed out after 300016...,同时本文还将给你拓展beego安装bee工具时出现unable to access ‘https://github.com/xxxx/xxxx‘: Failed to connect togo....解决办法、cocoapods问题Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`、create GitHub Actions and publish GitHub Actions All In One、Day 75/100 Docusaurus+GitHub Pages+Github Actions 自动部署博客等相关知识,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

Github报错——unable to access ‘https://github.com/.git/‘: Operation timed out after 300016...

Github报错——unable to access ‘https://github.com/.git/‘: Operation timed out after 300016...

出现的错误如下

fatal: unable to access ‘https://github.com/pray-for/ssm2.git/’: Operation timed out after 300016 milliseconds with 0 out of 0 bytes received

在这里插入图片描述


出错原因可能是因为事前使用过代理。
取消代理就可以了。

解决方法

输入下面的命令:

git config --global --unset http.proxy

在这里插入图片描述

beego安装bee工具时出现unable to access ‘https://github.com/xxxx/xxxx‘: Failed to connect togo....解决办法

beego安装bee工具时出现unable to access ‘https://github.com/xxxx/xxxx‘: Failed to connect togo....解决办法

教程主安装bee工具命令:

go get github.com/beego/bee

然而却出现了错误 :

  fatal: unable to access 'https://github.com/shiena/ansicolor/': Failed to connect to
go: error loading module requirements
 

不用想,安装失败了。

解决办法:

首先更改golang的配置网上有两种配置方法(这里以windows系统为例):

方式一:

go env -w goproxy=https://goproxy.io,direct
go env -w GO111MODULE=on

如何第一种命令执行错误,就执行方式二:

set GO111MODULE=on
set goproxy=https://goproxy.io

再次执行go get -u github.com/beego/bee命令,就可以安装成功了

装好之后,运行:

bee version

提示没有此命令: bash: bee: command not found

大意了。此时在项目目录里有一个/bin 目录里已经有一个  bee.exe 文件了,需要把 此目录(我的是L:\go\gopath\bin)加到系统的环境变量 path 里 ,关闭窗口,再打开,

$ bee version
______
| ___ \
| |_/ /  ___   ___
| ___ \ / _ \ / _ \
| |_/ /|  __/|  __/
\____/  \___| \___| v1.12.0

├── Beego     : 1.12.2
├── GoVersion : go1.12.5
├── GOOS      : windows
 

恭喜恭喜!一天的努力有效果了.

cocoapods问题Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`

cocoapods问题Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`

终端中:pod install 后出现:

Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.

You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

按照提示:pod repo add master https://github.com/CocoaPods/Specs.git

仍然不行,是因为安装多个xcode导致路径改变

解决: sudo xcode-select -switch 后面当前xcode路径

pod update --no-repo-update

pod install --verbose --no-repo-update

即可成功。

create GitHub Actions and publish GitHub Actions All In One

create GitHub Actions and publish GitHub Actions All In One

create GitHub Actions and publish GitHub Actions All In One

how to create your own GitHub Actions and publish it

Create a JavaScript Action using TypeScript

https://github.com/actions/typescript-action

https://www.thisdot.co/blog/creating-your-own-github-action-with-typescript

https://www.youtube.com/watch?v=8KAN16uCgVI

auto create a commit every day

# schedule 定时任务

refs


Flag Counter


©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载

Day 75/100 Docusaurus+GitHub Pages+Github Actions 自动部署博客

Day 75/100 Docusaurus+GitHub Pages+Github Actions 自动部署博客

(一)需求

我想搭一个自己的博客网站。

(二)方案

1、思路

  • 先实现手动打包后,能后发布到GitHub Pages;
  • Github Actions 实现提交代码CICD 自动化部署;

2、用的技术

  • Docusaurus
  • Markdown
  • GitHub Pages
  • Github Token
  • Github Actions

3、手动安装实现步骤

安装步骤Docusaurus官网有

https://www.docusaurus.cn/doc...

(1)安装脚手架
npx create-docusaurus@latest my-website classic

安装后,项目目录如下:

my-website
├── blog
│   ├── 2019-05-28-hola.md
│   ├── 2019-05-29-hello-world.md
│   └── 2020-05-30-welcome.md
├── docs
│   ├── doc1.md
│   ├── doc2.md
│   ├── doc3.md
│   └── mdx.md
├── src
│   ├── css
│   │   └── custom.css
│   └── pages
│       ├── styles.module.css
│       └── index.js
├── static
│   └── img
├── docusaurus.config.js
├── package.json
├── README.md
├── sidebars.js
└── yarn.lock
目录说明:
/blog/ - 包含博客的 Markdown 文件。如果你关闭了博客功能,则可以将此目录删除。你还可以通过设置 path 参数来改变此目录的名称。在 博客功能指南 文档中可以找到更多详细信息
/docs/ - 包含文档的 Markdown 文件。可在 sidebars.js 中自定义文档在侧边栏中的顺序。如果你关闭了文档功能,则可以删除该目录。你还可以通过设置 path 参数来改变此目录的名称。在 文档功能指南 中可以找到更多详细信息
/src/ - 非文档文件,例如独立页面(pages)或自定义的 React 组件。你不必严格地遵守将非文档文件放到这里,但是将它们集中在此目录下可以更轻松地进行管理,以便您需要进行某些格式校验或处理
/src/pages - 此目录中的任何扩展名为 JSX/TSX/MDX 文件都将被转换为网站的独立页面(page)。 可以在 独立页面(pages)指南 中找到更多详细信息
/static/ - 存放静态文件的目录。此处的所有内容都将被复制到最终的 build 目录的根目录下
/docusaurus.config.js - 包含站点配置的配置文件。与 Docusaurus 1 中的 siteConfig.js 文件等价
/package.json - Docusaurus 网站也是一个 React 应用程序。你可以在其中安装和使用所需的任何 npm 软件包
/sidebars.js - 生成文档时使用此文件来指定侧边栏中的文档顺序
(2)本地启动命令
cd my-website
npm run start
(3)配置文件
这四个文件不能错。
url: ''https://iguoxing.github.io'',
baseUrl: ''/iguoxing/'',
organizationName: ''iguoxing'', // Usually your GitHub org/user name.
projectName: ''iguoxing.github.io'', // Usually your repo name.
(4)本地打包

npm run build

(5)手动发布命令
GIT_USER=iguoxing USE_SSH=true yarn deploy

4、自动部署实现步骤

(1)新建gh-pages分支
(2)根目录建立.github/workflows/documentation.yml文件

文件配置如下

# Copyright 2022 zhaoguoxing
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Deploy Arden Github pages
on:
  push:
    branches:
      - main
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@main
      with:
        persist-credentials: false
    - name: Install and Build
      run: |
        npm install
        npm run-script build 
    - name: Deploy
      uses: JamesIves/github-pages-deploy-action@releases/v3
      with:
        ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
        BRANCH: gh-pages
        FOLDER: build
        BUILD_SCRIPT: npm install && npm run build
(3)配置GitHub AccessToken

https://docs.github.com/cn/au...

(4)提交代码后,就能实现了

这是我实现的效果;
https://iguoxing.github.io/ig...

5、记录卡住我的几个问题

(1)[Docusaurus Error] Running git push command failed. Does the GitHub user account you are using have push access to the repository?
organizationName 名称用 GitHub用户名;
(2)This workflow has no runs yet.
修改分支名为main

参考链接

https://juejin.cn/post/693684...

写在最后的话

学习路上,常常会懈怠

《有想学技术需要监督的同学嘛~》
https://mp.weixin.qq.com/s/Fy...

我们今天的关于Github报错——unable to access ‘https://github.com/.git/‘: Operation timed out after 300016...的分享就到这里,谢谢您的阅读,如果想了解更多关于beego安装bee工具时出现unable to access ‘https://github.com/xxxx/xxxx‘: Failed to connect togo....解决办法、cocoapods问题Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`、create GitHub Actions and publish GitHub Actions All In One、Day 75/100 Docusaurus+GitHub Pages+Github Actions 自动部署博客的相关信息,可以在本站进行搜索。

本文标签: