Contribute to django via github - django

I'm new at contributing. I made an improvement in django documentation and I want to push it to github. I follow this guide but I got the following problem on the push command git push origin ticket_xxxxx:
remote: Permission to django/django.git denied to <user>.
fatal: unable to access 'https://github.com/django/django.git/': The requested URL returned error: 403
My remote repositories are:
origin https://github.com/django/django.git (fetch)
origin https://github.com/django/django.git (push)
Any idea?

If you read the documentation carefully, you'll notice that in Setting up local repository, it leads you to clone the forked repository instead of the original django repository.
git clone git#github.com:github_nick/django.git
^^^^^^^^^^^
Instead of trying to push to django repository directly, fork django repository.
Commit, push to your forked repository. Then create pull request.

Related

Unable to push on heroku

Processing /D:/bld/astroid_1640971040574/work
remote: ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/D:/bld/astroid_1640971040574/work'
I am having above error while trying to upload to heroku using git push heroku main.
How can I push the changes?
Either what you are specifying includes a PATH (a local path which is only valid on your workstation, you local development environment).
Or what you are executing includes a path.
On the specification side, as explained here, check your requirements.txt file content (no path should be there)
On the execution side, make sure your server.js is not using PWD.
might be your project is in master branch of github.But you are trying to push main branch in heroku. Please check the branch in github where you uploaded the project carefully then push accordingly. Please upload with the screanshot of all command you given there.

How do I deploy an Angular 13 application to Git Hub Pages and not get Readme or 404

tldr; I think I need to add a github token. I have a token from github, but I have no idea how to implement it at the stage that I'm at.
I am trying to deploy an angular 13 app to github pages. Right now, it is just the auto-generated app (I haven't added or changed any code at this point). Here are the steps I have taken
Step 1: Create App and make sure it works
ng new <appName>
cd <appName>
ng serve
Step 2: Create a Repo on Github
Step 3: Check if it automatically connected to a repo (and remove if it's not the one we want)
git remote
git remote -v
git remote remove origin
Step 4: Connect to correct Git Repo (replace variables with username and project name)
git remote add origin <https://github.com/USERNAME/PROJECT_NAME.git>
Step 5: Push to Git repo
git branch -m main
git add .
git commit -m "initial commit"
git push -u origin main
Step 6: Hosting
npm install -g gh-pages
ng build --prod --base-href /PROJECT_NAME/ (find project name in angular.json at very bottom
gh-pages -d dist
When I do all of this, it shows that it worked. But then, it just loads a 404 error. After a lot of googling, I think it has something to do with a token. So I went and got the token, but I'm not sure what to do with it.
P.S. already saw Git Hub Pages not Deploying. (404) and it was unhelpful.
The answer was User Error. The code above works and will deploy an app successfully to gitHub pages.
The problem was I was going to https://humanhickory.github.io/ but the ng build --prod --base-href had actually created a new folder which I had to navigate to (so https://humanhickory.github.io//)
Futhermore, I was able to use the token by running gh-pages -d dist a second time. The first time I did it it said "remote: Invalid username or password. Fatal: authentication failed for '....'". However, when I ran the same command a second time, it prompted me to log in. So there's that.

Un-able to clone AWS-Code Commit Repo through Git-bsh from locl machine

Am new to AWS Code Commit concept, Creted new Repo in aws code-commit, coppied the https url & tried to clone the repo from my locala machine using git clone [url]
there its throwing me the error: fatal: unable to access 'https://git-codecommit.ap-south-1.amazonaws.com/v1/repos/test/': The requested URL returned error: 403
can any one please help me
enter image description here

Unable to Clone from Google Cloud Source Repository

I have created a project (ID: imagetest1-259203) within an organization. I successfully created a repository using
gcloud source repos create repo1
but when I tried to clone this to my PC using
gcloud source repos clone repo1
I get the following issue. (Note: I already have enabled "Cloud Source Repositories API")
Cloning into 'D:\AppEngineTests\repo1'...
remote: PERMISSION_DENIED: The caller does not have permission
remote: [type.googleapis.com/google.rpc.RequestInfo]
remote: request_id: "2e79f3c507f14b3190d7a5941bed3e5f"
fatal: unable to access 'https://source.developers.google.com/p/imagetest1-259203/r/repo1/': The requested URL returned error: 403
ERROR: (gcloud.source.repos.clone) Command '[u'git', u'clone', u'https://source.developers.google.com/p/imagetest1-259203/r/repo1', u'D:\\AppEngineTests\\repo1', u'--config', u'credential.helper=', u'--config', u'credential.helper=!gcloud.cmd auth git-helper --account=prabodar#xellmart.com --ignore-unknown $#']' returned non-zero exit status 128
But when I cloned to Cloud Shell using the same set of commands, it succeeded.
In order to clone the contents of a Google Cloud Repository you need:
authentication on your local system
a repository in Cloud Source Repositories
permissions to interact with the repository link
I suspect you have issues with permissions.
You have to install Cloud SDK.
Provide your authentication credentials:
gcloud init
and then clone the repository:
gcloud source repos clone [REPO_NAME] --project=[PROJECT_NAME]
I had this issue for months, I was using two different accounts, personal & work.
It worked on one PC, but not another PC.
FIX: Rename or delete this file: %USERPROFILE%_netrc
I tried:
gcloud auth revoke + then gcloud auth init
Renamed .gitconfig
Renamed .gitcookies
Deleted %USERPROFILE%\AppData\Roaming\gcloud
Deleted creds from Windows Credential Manager with 'git'
Eventually ran procmon to trace which files it was reading.
Renamed _netrc to _netrc.backup
Command then worked.
Undid rename and tested again, returned error message once again.

git pull origin master returns "Already up-to-date" even though it isn't

I'm using git pull origin master to pull my Bitbucket repo onto my Digital Ocean Django server directory (which already has some folders for Django like env and static) . When I do this it says Already up-to-date. but the repo didn't come through? I'm not sure if I'm misinterpreting what git pull does but I assumed it took the contents of mu repo and merged with my current directory. If this isn't true, can somebody explain what other command I should do to achieve this?
Have you set the origin at the first place, from where you want to pull the git repo. If not, then you should set the origin, first.
git remote add origin <link to your git repository>
for eg., git remote add origin https://github.com/gitaccname/gitproject.git
or, git remote add origin git#github.com:gitaccname/gitproject.git
After that, you can pull your git repository into whichever server you like, using the command.
git pull origin master