[Yarn] Unable to connect to github.com

Today when I cloned a new project and ran yarn install, the below error popped up. yarn install v1.22.17 [1/4] Resolving packages... [2/4] Fetching packages... error Command failed. Exit code: 128 Command: git Arguments: ls-remote --tags --heads git://github.com/WearyMonkey/ngtemplate-loader.git Directory: /home/xxx/source/github.com/xxx/xxx/app Output: fatal: unable to connect to github.com: github.com[0: 220.28.17.148]: errno=Connection timed out The solution is to execute the below command under the cloned git repository. git config --global url."https://".insteadOf git://

[VSCode] Golang No definition found

I have been using VS Code to develop Golang program for few years, and recently the issue “no definition found” bothered me a lot. At the beginning, the issue only happens in the mixed project where the go.mod is in the sub-directory under the root path. With this case, I still can use navigation feature to jump the editor among struct definition, function implementation or packages by opening the go.mod path as the root directory with VS Code. However, it even does not work in this way, which pushes me to solve the problem completely. ...

[Nomad] source path must be a file

When I run up a nomad job with the job file “example.nomad” created by nomad job init, the below error showed up Error getting job struct: Error getting jobfile from "example.nomad": source path must be a file The completed commands are: nomad job init # example.nomad is created nomad job run example.nomad # error pops up This issue stuck me for a while as I clearly remember that I successfully ran it up before. And these are very basic commands to play with Nomad set up. ...

[Slack] no_text error with Slack integration

Recently I had a task to integrate Slack notification in Github Action workflow. Thanks to the repository slack-github-action, the work becomes much easier. The Slack integration works well when the payload only contains text and block. However, an error popped up while I changed the payload only with attachments. (We can add color to attachments which will highlight the message in Slack channel) The error was axios post failed, double check the payload being sent includes the keys Slack expects\n Error: no_text The first reaction after seeing the error is that I should add a text into the payload. But it turned out that the Slack message will only show the text content and ignore the attachment. ...

[Git] Unable access xxx: Is a directory

When I run git status, it shows the below error warning: unable to access '/etc/gitconfig': Is a directory warning: unable to access '/etc/gitconfig': Is a directory warning: unable to access '/etc/gitconfig': Is a directory The solution is to remove /etc/gitconfig. The target /etc/gitconfig might be varied from each case. With the below command, all can be solved. sudo rmdir /etc/gitconfig The reason that the problem suddenly pops up is because I ran a experiment docker command something like docker run --rm -v /etc/gitconfig:/etc/gitconfig ..... So the /etc/gitconfig is created. ...

[Git] Error: remote rejected (permission denied)

The error pop up When I pushed the changes on a new branch for the first time. ! [remote rejected] oscar-next -> oscar-next (permission denied) error: failed to push some refs to 'https://github.com/oscarzhou/portainer.git' The solution is to update the git config like below git config --local --list # old config remote.origin.url=https://github.com/oscarzhou/bar.git # update new config with git config remote.origin.url https://foo%40gmail.com@github.com/oscarzhou/bar.git After that, we can run git push --set-upstream origin <branch_name>

[Git] Fatal: this operation must be run in a work tree

fatal: this operation must be run in a work tree The error pop up while running git status. The solution is to change the repository not bare mode git config core.bare false

[Linux] Error: ENOSPC: System limit ...

I can do general frontend work, but I’m not specialized in front end. Today when I run up the front-end project, I met the following issue. Error: Watchpack Error (watcher): Error: ENOSPC: System limit for number of file watchers reached... The reason is that there is restriction of opening files by one process in Linux. The default number of opening file might be too limited especially when you run with webpack. The solution is to increase the limitation. You can change as below. ...

[Ubuntu] External hard drive is read-only

Yesterday I installed Ubuntu on my PC, but I met an issue about the external drive is always the read-only. As the hard drive was the destination of my internal minio server, so I have make it writable too. Error: mkdir: cannot create directory ‘abc’: No such file or directory When I ran the df -T, it shows like /dev/sdb2 fuseblk 3907000316 278934580 3628065736 8% /media/username/InternalBackup I labelled the hard drive name as InternalBackup in the Windows OS before. ...

[microk8s] Troubleshooting Microk8s Installation on macOS

Error: Your Command Line Tools are too outdated By following the instruction from the official website Alternative install methods: macOS, I got an error while running brew install ubuntu/microk8s/microk8s as shown below As the prompt suggested, I installed the latest Xcode from the AppStore. (It took quite long to be honest). But it still showed the same error after updating the Xcode to the 13.2.1 The trick is that we should run the following commands: ...

DigitalOcean Referral Badge
Sign up to get $200, 60-day account credit !