I have some questions about gh-pages. I have a githab repository and project
Page as githubpages. In the project directory that I use the
Github repository created has git push, git pull, git build and
git deploy without problems. The site can be found at http://ux.example.com
call. Unfortunately, it is not possible to make the page using https://ux.example.com
call. In the settings, it is explicitly pointed out,
That it is not possible to call custom subdomains with https.
I have on another computer the repository via git clone
downloaded. Git pull, git push, git build works perfectly.
I suspect that the cause is the subdomain. How do I solve the problem?
With git deploy I get the following error message:
yarn run deploy
yarn run v0.27.5
$ gh-pages -d styleguide
fatal: attempt to fetch/clone from a shallow repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Related
Tried to merge a script.js file that was created in VS code on my local device to the github repo using GitBash but the branch said main/merging now and it won't let me do the necessary changes. I also do not know the commands to do that. Please help!!
vladb#DESKTOP-2NNNLGM MINGW64 ~/prework-study-guide (main|MERGING)
$ git checkout main
error: you need to resolve your current index first
prework-study-guide/assets/script.js: needs merge
vladb#DESKTOP-2NNNLGM MINGW64 ~/prework-study-guide (main|MERGING)
$ git clone prework-study-guide/assets/script.js
Cloning into 'script.js'...
error: 'C:/Users/vladb/prework-study-guide/prework-study-guide/assets/script.js' does not look like a v2 or v3 bundle file
fatal: invalid gitfile format: C:/Users/vladb/prework-study-guide/prework-study-guide/assets/script.js
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
vladb#DESKTOP-2NNNLGM MINGW64 ~/prework-study-guide (main|MERGING)
$ git push -u origin master
error: src refspec master does not match any
error: failed to push some refs to 'github.com:Cicatrice-Vlad/prework-study-guide.git'
recently I have deployed my first React App on GitHub Pages
https://karan-dhingra.github.io/lct/
Now I updated react app and my changes are not reflected on GitHub Pages. But everything was working well on Localhost. So, please guide me on how can I update my deployed React App on GitHub Pages.
Just we need to run 3-4 commands
git init
git remote ****************.git [ Here we will add our repository link ending with.git you will found it in the code option in your repo.
npm run deploy [Make sure you have installed gh pages first]
git add .
git commit -m "Here you write message while committing, you can write anything here"
git push origin master
So, with using these commands everything will work well.
Make sure you save the code in the IDE. after saving check with "git status" command and commit & push to git repo and the changes will be reflected
In my case, the lines below have helped. My app is deployed via gh-pages:
git add .
git commit -m '...'
npm run deploy
I am trying to publish the package using npm publish command. but I am getting this error every time.
npm ERR! code E403
npm ERR! 403 Forbidden - PUT https://registryname - forbidden
I have
"publishConfig": {
"registry": "https://registryname"
}
and in .npmrc
registry=https://registryname
I have tried many solutions but no luck.
Or anyone trying to publish a package (for the first time) and getting the same failure, it could also be because you just created npmjs account, and you haven't yet verified the account creation through a link that was sent to your email address.
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/mac-info-lib - you must verify your email before publishing a new package: https://www.npmjs.com/email-edit
Do you have an account? You can;
First check your account using npm whoami
if you have an account then login, your session might be expired. npm login. Follow the login prompt.
Then once you are logged in, make sure you are in the right directory, you wont be able to publish if you are not in the directory of the project you are working on.
If your library has a name that is already existed in npm registry. It will give you this error.
npm ERR! code E403
npm ERR! 403 Forbidden - PUT https://registryname - forbidden
Solution:
If you are publishing your package first time, you need to make sure the name is unique that is not already there.
If you are publishing or updating new version, then make sure you update the version number in package.json fie.
Be sure to login first to the official link :
https://www.npmjs.com/login
then they will ask for mail verification(A kind of pop up at the header).
After verification npm publish will work.
Note : if still not working change package name
Or just go into your package.json and update the version number.
I recently deployed a nodejs API through Heroku. I want to update the new changes to the deployment but whenever I push (git push Heroku master) I receive an error.
Error: ENOENT: no such file or directory, scandir '/app/seeds'
This started behaving this way after I ran npm install pg
While deploying the changes to Heroku it is unable to find /app/seeds directory and so it will not be able to be pushed to Heroku and this is what causes a problem.
Maybe some of your files do have got deleted. So here what you can do is delete your node_modules folder and just run the command npm install so all your packages should be having completed files and then do git push heroku master.
I also faced a similar issue and it resolved my problem. So can you please give it a try.
I want to backup my project, so I have tried initializing a rep with
git init
and then commit all files with
git add .
git commit -am "first commit"
and now I want to push it to a repository (which is not only locally stored).
I know I have to do something like
git push origin master
I know that master is the name of my branch, but what is origin?
Where are the files stored? Do I have to create a repository on GitHub, so the files can be stored on GitHub's servers or are there some Git servers which can store my files for free (I assume not :D)?
So do I have to first create the repository on GitHub and then connect my local project with the GitHub repository with
git remote <url_to_GitHub_rep>
Create a repository in github and copy the git url(Something Like https://github.com/username/gitname.git ).
Then
git init
git add .
git commit -m "First commit"
git remote add origin https://github.com/username/gitname.git
git remote -v
git push origin master
Then You Will Be Asked Your Github Username & Password.
Now Enter Github Username and Password.
The Files Will Uploaded to your repository.
Thank You.
First of all you need to be have an account.
The most popular way to back up projects with git is using remote git repo.
For the remote git repo, it can be setup on your own server, or it can be hosted on github, bitbucket etc.
The remote repo is the place where you really version control or backup your project. And the local git repo works as working copy for remote repo. You can connect remote repo with local repo with the situations:
Already has local repo (the situation as you have):
git add .
git commit
git remote add origin <remote repo URL>
git push -u origin master
Note:
origin is the default name for the remote repo (similar as master is default branch name), of cause you can use other names to replace origin.
-u (--set-upstream) option is set the tracking relationship between local master branch and remote master branch. You can find your local master is behind or ahead of remote master branch by git status.
Not has local repo:
git clone <remote repo URL>
cd <repo name>
git add .
git commit
git push origin master
Note: when you clone a remote repo locally, git will set the remote name as origin by default.