Forums

Pull to a private repository as contributor from PythonAnywhere?

UPDATE: the first word in the title is wrong: it is push, and not pull.

Hey all

we are running a Django project and we created a private repository on GitHub for the codebase.

I (contributor) then accessed pythonAnywhere using SSH key and I made some changes that I would like to push using my GitHub profile, which is not the profile hosting such a private repository. So, instead of the repository's owner username and password I used mine, but if prompting github log I see the commit has been registered with the owner's credentials. Here's a screenshot of the terminal.

I also cloned the repository on my local machine and, from there, I succeeded in committing. However, the main drawback is I cannot correctly use the database. If I login on pythonAnywhere, I experience the same as described above.

Here's the question: is it possible to commit as a contributor if logged in on pythonAnywhere? obs: the pythonAnywhere account is not mine.

Thanks for helping.

I'm pretty sure that the email and name associated with a commit is what is specified in the .gitconfig file for the account that made the commit -- that is, the values that were specified using

$ git config --global user.name "John Doe"
$ git config --global user.email "john@doe.org"

...for the account. According to this page, you can change that at the time you make the commit by specifying it on the command line:

git commit --author="James Smith <james@smith.com>"

That works perfectly. Thank you very much!

:)