Can't pull a repository from Github

Hello,

 

New to pycharm.

I created a project directory locally and am now trying to pull the data from my github.

Getting the following errors, while "managing Remotes"

Cannot add remote origin 'https://github.com/Trilife/udi-mqtt-pg3x.git' in U:\ns\from_trilife: detected dubious ownership in repository at '//UDI-eisy/admin/ns/from_trilife' '//UDI-eisy/admin/ns/from_trilife' is owned by: 'S-1-5-21-1044421283-2654941420-yyy' but the current user is: 'S-1-5-21-17310927-897113443-xxx' To add an exception for this directory, call: git config --global --add safe.directory '%(prefix)///UDI-eisy/admin/ns/from_trilife'

Where do I make the CALL, that they suggest at the end of this popup? Thanks

 

0

The suggested solution in the error message is to add an exception for the directory using the git config command. To resolve this, you need to open a terminal or command prompt, navigate to the root directory of your Git repository, and then run the command they provided: 

 
git config --global --add safe.directory '%(prefix)///UDI-eisy/admin/ns/from_trilife'

Here's a breakdown of what the command does:

  • git config: This is the command to configure Git settings.
  • --global: This flag specifies that the configuration should be applied globally for the current user, rather than just for the current repository. 
  • --add: This flag tells Git to add a new configuration entry.
  • safe.directory: This is the configuration key that you're setting. It's used to specify exceptions for dubious ownership. https://www.paybyplatema.me/
  • '%(prefix)///UDI-eisy/admin/ns/from_trilife': This is the value you're providing for the safe.directory key. It's the path to the directory where you're encountering the ownership issue.

After running this command, Git should add an exception for the specified directory, allowing you to interact with the repository without encountering the ownership mismatch error.

Keep in mind that the exact path you provide should match the path of the repository directory where you're encountering the issue. Make sure to navigate to the correct directory in the terminal before running the git config command.

 
0

Thank you @beertigerfive!

And thanks for taking the time to explain the various elements. Helps my git education....

I solved this problem and have a new one: the reason I'm trialling PyCharm Pro is to have access to its remote interpreter function. This, in order to access all the resources (USB etc), which are available on that box.

The remote device is a Linux box (Universal Devices EISY home automation), running on FreeBSD and PyCharm was able to SSH into it. However, I'm being denied access. Something about rights...

Cheers

0
Could you provide more specific errors and the paths they point to? Also, please collect logs from **Help | Collect Logs and Diagnostic Data**, upload them to https://uploads.jetbrains.com and provide the upload id, so I could give a more in-depth reply.
0

Hello Andrey Resler,

Here is the upload ID:

Upload id: 2023_08_22_Mj3JYwmfgUB79hK9DtjSMa (file: pycharm-logs-20230822-10470014857266138146464343.zip)

In step 3/4, Introspecting SSH Server, I get the following: 

Successfully connected to admin@192.168.10.160:22

> pwd
/usr/home/admin
Command finished with exit code 0
> pwd
/usr/home/admin
Command finished with exit code 0
Rsync command 'rsync' was not found neither in local PATH nor as full executable path
Starting introspection for Python...
> pwd
/usr/home/admin
Command finished with exit code 0
> echo ${SHELL}
/usr/local/bin/bash
Command finished with exit code 0
> /usr/bin/which python3
/usr/local/bin/python3
Command finished with exit code 0
> pwd
/usr/home/admin
Command finished with exit code 0
> echo ${HOME}
/home/admin
Command finished with exit code 0

Introspection completed

Once I hit NEXT, it asks me to sign into my license,

And now it seems to work, at least trying print("Hello World") in the python console. It does show this on top, indicationg that I'm in the Linux box:

/usr/local/bin/python3 /usr/home/admin/.pycharm_helpers/pydev/pydevconsole.py --mode=client --host=localhost --port=10745 
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['/tmp/pycharm_project_352/'])

No idea what the difference is though. I might revert, once I try running actual programs.

Cheers!

 

0
Thanks. The log says there are issues with downloading remote sources, so I'm guessing you should see a bunch of unresolved references errors in the editor. If this is the case, please specify which file system is used on the remote.

But I hope I'm wrong and everything works :) Let me know if you have further issues.
0

Thnak You for the solution, i have applied the same process.

0

请先登录再写评论。